/* ===== Device Frame Placeholders ===== */
/* CSS-only device mockup frames for screen prototypes */

/* Container row for device frames within a step card */
.dev-row {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--bd);
  justify-content: center;
  align-items: flex-end;
}

/* Individual device frame wrapper */
.dev-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ---- Bezel (outer frame of the device) ---- */
.dev-bezel {
  background: var(--sf2);
  border: 2px solid var(--bd);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* ---- Screen (inner content area) ---- */
.dev-screen {
  background: var(--sf);
  border: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Screen with iframe: overflow hidden container ---- */
.dev-screen:has(.dev-iframe) {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
}

/* ---- Iframe content inside screen ---- */
.dev-iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  border-radius: inherit;
  pointer-events: none;
  transform-origin: 0 0;
}

/* Inline thumbnail: render at full page size, then scale down to fit */
/* desktop screen = 240×150px, scale = 240/1280 ≈ 0.1875 → use 0.19 */
.dev-desktop .dev-iframe {
  width: 1280px;
  height: 790px;
  transform: scale(0.1875);
}
.dev-tablet .dev-iframe {
  width: 1024px;
  height: 768px;
  transform: scale(0.195);
}
.dev-mobile .dev-iframe {
  width: 390px;
  height: 844px;
  transform: scale(0.308);
}

/* Modal iframe: full size, interactive */
.dev-iframe-modal {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: auto;
}

/* Modal screen container: override thumbnail dimensions */
.dev-modal .dev-screen:has(.dev-iframe-modal) {
  width: 100% !important;
  height: 100% !important;
  overflow: auto;
}

.dev-modal .dev-desktop .dev-screen:has(.dev-iframe-modal) {
  aspect-ratio: 16 / 10;
  height: auto !important;
}

.dev-modal .dev-tablet .dev-screen:has(.dev-iframe-modal) {
  aspect-ratio: 4 / 3;
  height: auto !important;
}

.dev-modal .dev-mobile .dev-screen:has(.dev-iframe-modal) {
  aspect-ratio: 9 / 19.5;
  width: auto !important;
  height: 70vh !important;
  max-height: 700px !important;
}

/* ---- Placeholder content inside screen ---- */
.dev-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 12px;
}

.dev-ph-icon {
  font-size: 28px;
  color: var(--txm);
  opacity: 0.4;
  line-height: 1;
}

.dev-ph-text {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--txm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Labels below device ---- */
.dev-labels {
  text-align: center;
}

.dev-type {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--tx);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dev-user {
  font-size: 11px;
  color: var(--txd);
  margin-top: 2px;
}

/* ---- Camera dot (desktop & tablet) ---- */
.dev-cam {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bdl);
  margin: 6px auto;
}

/* ---- Notch (mobile) ---- */
.dev-notch {
  width: 40px;
  height: 6px;
  border-radius: 3px;
  background: var(--bdl);
  margin: 6px auto;
}

/* ==== DESKTOP — Monitor with stand ==== */
.dev-desktop .dev-bezel {
  width: 260px;
  border-radius: 10px;
  padding: 4px 10px 10px;
}

.dev-desktop .dev-screen {
  width: 240px;
  height: 150px;
  border-radius: 4px;
}

/* Monitor stand */
.dev-stand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dev-stand-neck {
  width: 20px;
  height: 14px;
  background: var(--bd);
  border-left: 2px solid var(--bdl);
  border-right: 2px solid var(--bdl);
}

.dev-stand-base {
  width: 60px;
  height: 6px;
  background: var(--bd);
  border-radius: 0 0 4px 4px;
  border: 2px solid var(--bdl);
  border-top: none;
}

/* ==== TABLET — Landscape ==== */
.dev-tablet .dev-bezel {
  width: 224px;
  border-radius: 14px;
  padding: 4px 12px 12px;
}

.dev-tablet .dev-cam {
  width: 5px;
  height: 5px;
}

.dev-tablet .dev-screen {
  width: 200px;
  height: 150px;
  border-radius: 4px;
}

/* ==== MOBILE — Portrait ==== */
.dev-mobile .dev-bezel {
  width: 140px;
  border-radius: 18px;
  padding: 4px 10px 10px;
}

.dev-mobile .dev-screen {
  width: 120px;
  height: 260px;
  border-radius: 4px;
}

.dev-mobile .dev-notch {
  width: 36px;
  height: 5px;
}

/* ---- Hover interaction ---- */
.dev-bezel {
  transition: border-color 0.2s var(--ease-standard);
}

.dev-ph-icon {
  transition: color 0.2s var(--ease-standard), opacity 0.2s var(--ease-standard);
}

.dev-frame:hover .dev-bezel {
  border-color: var(--blue);
}

.dev-frame:hover .dev-ph-icon {
  color: var(--blue);
  opacity: 0.7;
}

.dev-frame {
  cursor: pointer;
}

/* ===== Modal Overlay ===== */
.dev-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dev-fade-in 0.2s ease;
}

[data-theme="dark"] .dev-modal-overlay {
  background: rgba(0, 0, 0, 0.75);
}

/* ---- Modal body: screen + optional description panel ---- */
.dev-modal-body {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 92vw;
  max-height: 92vh;
  animation: dev-scale-in 0.25s var(--ease-standard);
}

.dev-modal-screen-col {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dev-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Modal device — enlarged versions */
.dev-modal .dev-frame {
  cursor: default;
  pointer-events: none;
}

.dev-modal .dev-bezel {
  border-color: var(--bdl);
}

/* Desktop modal: sized to leave room for description panel */
.dev-modal .dev-desktop .dev-bezel {
  width: 56vw;
  max-width: 1000px;
  padding: 6px 16px 16px;
}

.dev-modal-overlay:not(.has-desc) .dev-modal .dev-desktop .dev-bezel {
  width: 75vw;
  max-width: 1200px;
}

.dev-modal .dev-desktop .dev-screen {
  width: calc(100% - 32px);
  aspect-ratio: 16 / 10;
  height: auto;
  border-radius: 6px;
}

.dev-modal .dev-desktop .dev-cam {
  width: 8px;
  height: 8px;
  margin: 8px auto;
}

.dev-modal .dev-desktop .dev-stand-neck {
  width: 40px;
  height: 24px;
}

.dev-modal .dev-desktop .dev-stand-base {
  width: 120px;
  height: 8px;
}

/* Tablet modal */
.dev-modal .dev-tablet .dev-bezel {
  width: 56vw;
  max-width: 900px;
  padding: 6px 16px 16px;
}

.dev-modal-overlay:not(.has-desc) .dev-modal .dev-tablet .dev-bezel {
  width: 75vw;
  max-width: 1100px;
}

.dev-modal .dev-tablet .dev-screen {
  width: calc(100% - 32px);
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 6px;
}

.dev-modal .dev-tablet .dev-cam {
  width: 7px;
  height: 7px;
  margin: 8px auto;
}

/* Mobile modal */
.dev-modal .dev-mobile .dev-bezel {
  width: auto;
  padding: 6px 14px 14px;
  border-radius: 28px;
}

.dev-modal .dev-mobile .dev-screen {
  height: 70vh;
  max-height: 700px;
  width: auto;
  aspect-ratio: 9 / 19.5;
  border-radius: 6px;
}

.dev-modal .dev-mobile .dev-notch {
  width: 64px;
  height: 7px;
  border-radius: 4px;
  margin: 8px auto;
}

/* Modal placeholder text scaled up */
.dev-modal .dev-ph-icon {
  font-size: 56px;
}

.dev-modal .dev-ph-text {
  font-size: 14px;
  letter-spacing: 2px;
}

/* Modal labels */
.dev-modal .dev-labels {
  pointer-events: none;
}

.dev-modal .dev-type {
  font-size: 15px;
}

.dev-modal .dev-user {
  font-size: 14px;
  margin-top: 4px;
}

/* ---- Modal counter ---- */
.dev-modal-counter {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
  text-align: center;
}

.dev-modal-counter-current {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

/* Close / navigation hint */
.dev-modal-hint {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Open in new tab button — below device frame */
.dev-modal-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 7px 16px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.dev-modal-open-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
}

.dev-modal-open-icon {
  font-size: 15px;
  line-height: 1;
}

/* ===== Modal Navigation Arrows ===== */
.dev-modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0;
}

.dev-modal-nav-prev {
  left: 20px;
}

.dev-modal-nav-next {
  right: 20px;
}

.dev-modal-nav:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}

.dev-modal-nav.disabled {
  opacity: 0.15;
  cursor: default;
  pointer-events: none;
}

.dev-modal-nav-icon {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

/* ===== Description Panel ===== */
.dev-desc-panel {
  width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px 24px;
  margin-left: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  align-self: center;
  animation: dev-slide-in-right 0.3s ease;
}

[data-theme="light"] .dev-desc-panel {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

.dev-desc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .dev-desc-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.dev-desc-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  flex: 1;
}

[data-theme="light"] .dev-desc-title {
  color: #111827;
}

.dev-desc-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  margin-top: 2px;
}

.dev-desc-open-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.dev-desc-open-icon {
  font-size: 13px;
  line-height: 1;
}

[data-theme="light"] .dev-desc-open-btn {
  color: rgba(0, 0, 0, 0.45);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .dev-desc-open-btn:hover {
  color: rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

.dev-desc-block {
  margin-bottom: 18px;
}

.dev-desc-block:last-child {
  margin-bottom: 0;
}

.dev-desc-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="light"] .dev-desc-label {
  color: rgba(0, 0, 0, 0.45);
}

.dev-desc-icon {
  font-size: 8px;
  opacity: 0.6;
}

.dev-desc-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="light"] .dev-desc-text {
  color: rgba(0, 0, 0, 0.7);
}

/* Roles tags */
.dev-desc-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dev-desc-role {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--role-color) 15%, transparent);
  color: var(--role-color);
  border: 1px solid color-mix(in srgb, var(--role-color) 25%, transparent);
  white-space: nowrap;
}

/* Section descriptions */
.dev-desc-section {
  margin-bottom: 14px;
}

.dev-desc-section:last-child {
  margin-bottom: 0;
}

.dev-desc-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
}

[data-theme="light"] .dev-desc-section-title {
  color: rgba(0, 0, 0, 0.8);
}

.dev-desc-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dev-desc-items li {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  padding: 2px 0 2px 14px;
  position: relative;
}

[data-theme="light"] .dev-desc-items li {
  color: rgba(0, 0, 0, 0.55);
}

.dev-desc-items li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.25);
  font-size: 10px;
}

[data-theme="light"] .dev-desc-items li::before {
  color: rgba(0, 0, 0, 0.2);
}

/* Description panel scrollbar */
.dev-desc-panel::-webkit-scrollbar {
  width: 4px;
}

.dev-desc-panel::-webkit-scrollbar-track {
  background: transparent;
}

.dev-desc-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

@keyframes dev-slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Carousel ===== */
.dev-carousel {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--bd);
}

.dev-carousel .dev-row {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Carousel header with arrows and counter */
.dev-carousel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.dev-carousel-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--bd);
  background: var(--sf2);
  color: var(--tx);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-standard);
  padding: 0;
}

.dev-carousel-arrow:hover:not(.disabled) {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.dev-carousel-arrow.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.dev-arrow-icon {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.dev-carousel-counter {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--txm);
  letter-spacing: 1px;
  min-width: 60px;
  text-align: center;
}

/* Carousel dots */
.dev-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.dev-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--bd);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s var(--ease-standard);
}

.dev-carousel-dot:hover {
  border-color: var(--blue);
}

.dev-carousel-dot.active {
  background: var(--blue);
  border-color: var(--blue);
  width: 20px;
  border-radius: 4px;
}

/* Hidden carousel items */
.dev-carousel-hidden {
  display: none !important;
}

/* Carousel track: show items smoothly */
.dev-carousel-track {
  justify-content: center;
}

/* Animations */
@keyframes dev-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dev-scale-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
