/* GrowUpMorf Multi-Page & Component Stylesheet */

/* Navigation active indicator */
.nav-link[aria-current="page"],
.nav-link.active {
  color: var(--primary);
  font-weight: 700;
}

/* Fixed Bottom Navigation Bar for Mobile */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 64px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 250;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }
  .bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
    min-height: 48px;
    text-decoration: none;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 500;
    transition: color 150ms ease;
  }
  .bottom-tab span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 11px;
  }
  .bottom-tab img {
    width: 22px;
    height: 22px;
    opacity: 0.65;
    transition: opacity 150ms ease, transform 150ms ease;
  }
  .bottom-tab:hover,
  .bottom-tab[aria-current="page"],
  .bottom-tab.active {
    color: var(--primary);
    font-weight: 700;
  }
  .bottom-tab[aria-current="page"] img,
  .bottom-tab.active img {
    opacity: 1;
    transform: scale(1.12);
  }
  body {
    padding-bottom: 74px; /* Clearance for fixed tab bar on mobile */
  }
}

/* Real Frames Filmstrip Showcase */
.filmstrip-wrap {
  margin-top: 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  overflow-x: auto;
}
.filmstrip-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: min-content;
}
.filmstrip-frame {
  width: 96px;
  aspect-ratio: 9/16;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease;
}
.filmstrip-frame:hover {
  transform: scale(1.05);
}

/* Custom Art Showcase in Features */
.feature-art-media {
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.custom-art-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin-bottom: 14px;
}
.draft-preview-img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9/16;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* Accordion FAQ (Native <details> / <summary>) */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.faq-item[open] {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}
.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 400;
  color: var(--primary);
  line-height: 1;
  transition: transform 180ms ease;
}
.faq-item[open] .faq-summary::after {
  content: "–";
}
.faq-content {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* Checkmark Icon in Features & Lists */
.check-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Layout Helpers (zero inline styles) */
.card-art-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.draft-preview-box {
  margin-top: 18px;
  text-align: center;
}
.art-centered {
  margin-top: 18px;
  text-align: center;
}
.step-icon-wrap {
  margin-top: 20px;
}
.step-icon {
  opacity: 0.8;
}
.cta-banner-spaced {
  padding-top: 64px;
}
.hero-signin {
  margin-top: 24px;
}


/* Create page: the photo picker (Opus A, 19.9). Storefront skill. */
.create-wrap { max-width: 820px; margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pick-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 24px; border: 2px dashed var(--primary-border);
  border-radius: var(--radius-xl); background: var(--primary-tint);
  cursor: pointer; text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.pick-drop:hover {
  border-color: var(--primary);
  background: hsl(var(--primary-h) var(--primary-s) var(--primary-l) / 0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.pick-drop:has(+ #files:focus-visible) { outline: 2px solid var(--primary-dark); outline-offset: 3px; }
.pick-drop-art { width: 56px; height: 56px; margin-bottom: 4px; transition: transform 0.25s ease; }
.pick-drop:hover .pick-drop-art { transform: scale(1.08) translateY(-2px); }
.pick-drop-title { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.pick-drop-hint { font-size: 0.88rem; color: var(--ink-muted); }

.pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px; margin-block: 28px 20px;
}
.pick-grid:empty { display: none; margin: 0; }
.pick {
  margin: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pick:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}
.pick-img, .pick-name {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: calc(var(--radius-md) - 4px); background: var(--bg-subtle); display: block;
}
.pick-name {
  display: flex; align-items: center; justify-content: center; padding: 10px;
  font-size: 0.75rem; color: var(--ink-muted); text-align: center;
  overflow-wrap: anywhere; word-break: break-word;
}
.pick-remove {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 34px; padding: 4px 10px; font-size: 0.8rem; font-weight: 500;
  font-family: inherit; color: var(--ink-muted); background: var(--bg-subtle);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.15s ease;
}
.pick-remove:hover {
  color: var(--primary); border-color: var(--primary);
  background: var(--primary-tint);
}

.create-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-block: 24px 16px; padding: 16px 20px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.pick-count { font-size: 1rem; font-weight: 600; color: var(--ink); }
#start { min-width: 150px; }
#start[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; box-shadow: none; }
#create-note.note {
  margin-top: 16px; padding: 12px 18px; border-radius: var(--radius-md);
  font-size: 0.92rem; text-align: center; background: var(--primary-tint);
  border: 1px solid var(--primary-border); color: var(--ink);
}

@media (max-width: 640px) {
  .pick-drop { padding: 30px 16px; border-radius: var(--radius-lg); gap: 8px; }
  .pick-drop-art { width: 48px; height: 48px; }
  .pick-drop-title { font-size: 1.05rem; }
  .pick-drop-hint { font-size: 0.82rem; }
  .pick-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-block: 20px 16px; }
  .pick { padding: 6px; gap: 6px; }
  .pick-remove { min-height: 30px; font-size: 0.75rem; padding: 2px 6px; }
  .create-bar { padding: 12px 16px; gap: 12px; }
  #start { flex: 1; min-width: 120px; }
  .pick-count { font-size: 0.9rem; }
}

/* Reordering + approving the order (Opus A, 19.9, Ben: "drag the photos into order") */
.pick { position: relative; cursor: grab; }
.pick.dragging { opacity: 0.45; cursor: grabbing; }
.pick.drop-here { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-border); }
.pick-num {
  position: absolute; inset-block-start: 14px; inset-inline-start: 14px; z-index: 1;
  min-width: 26px; height: 26px; padding-inline: 6px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full); background: var(--primary-dark); color: #fff; font-size: 0.8rem; font-weight: 700;
}
.pick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.pick-actions .pick-remove { grid-column: 1 / -1; order: 3; }
.pick-actions .pick-remove, .pick-move { min-height: 44px; }
.pick-move {
  display: flex; align-items: center; justify-content: center; padding: 0;
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg-subtle);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pick-move:hover { border-color: var(--primary); color: var(--primary-dark); }
.pick-move:focus-visible, .pick-remove:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
.order-box { display: flex; flex-direction: column; gap: 8px; margin-block-end: 16px; }
.order-box[hidden] { display: none; }
.order-hint { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }
.order-ok { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.order-ok input { width: 20px; height: 20px; accent-color: var(--primary-dark); }
@media (prefers-reduced-motion: reduce) { .pick, .pick-move { transition: none; } }

/* My orders: the video's progress and the video (Opus A, 19.9, 4ז) */
.order-progress { display: flex; flex-direction: column; gap: 8px; margin-block-start: 12px; }
.progress-state { margin: 0; font-weight: 600; }
.progress-done { color: var(--primary-dark); }
.progress-failed { color: #b42318; }
.progress-rejected { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }
.order-video-box { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.order-video { width: 100%; max-width: 360px; aspect-ratio: 9 / 16; border-radius: var(--radius-md); background: #000; }

/* Length choice (length-plan.html stage 3, 20.9): after the plan, before upload */
.length-box[hidden] { display: none; }
.length-box { margin-block: 8px 16px; }
.length-header { margin: 0 0 24px; }
.length-title { font-size: 24px; }

.len-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.len-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 18px; text-align: center; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.len-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.len-card:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
.len-card-selected {
  border-color: var(--primary); box-shadow: var(--shadow-md), 0 0 0 1px var(--primary);
  background: var(--card-elevated);
}
.len-card-title { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.len-card-time { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.len-card-desc { margin: 0; font-size: 0.85rem; color: var(--ink-muted); line-height: 1.5; }

.len-more { margin-block-start: 16px; }
/* .faq-summary's own box (not the <details> padding around it) is the real tap
   target -- the padding around it looks like room but a tap there never toggles
   it. At 15px text that box is ~24px tall, under the 44px floor (found in mobile
   screenshot QA, 20.9). min-height on the summary itself, not the wrapper. */
.len-more-summary { font-size: 15px; min-height: 44px; }
.len-more-list { display: flex; flex-direction: column; gap: 8px; }
.len-more-row {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.len-more-row:hover { border-color: var(--primary-border); background: var(--primary-tint); }
.len-more-row:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
.len-more-row-selected { border-color: var(--primary); background: var(--primary-tint); }
.len-more-time { font-weight: 700; min-width: 3.5em; }
.len-more-desc { color: var(--ink-muted); font-size: 0.9rem; }
.len-more-flag { color: hsl(var(--secondary-h) 70% 42%); font-size: 0.82rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { .len-more-flag { color: hsl(var(--secondary-h) 90% 70%); } }
:root[data-theme="dark"] .len-more-flag { color: hsl(var(--secondary-h) 90% 70%); }

.length-actions { display: flex; justify-content: flex-end; margin-block-start: 20px; }

@media (max-width: 640px) {
  .len-cards { grid-template-columns: 1fr; gap: 10px; }
  .len-card { padding: 18px 16px; }
  .len-card-time { font-size: 1.4rem; }
  .length-actions { justify-content: stretch; }
  .length-actions .button { width: 100%; }
}
