﻿/* Mobile: wrappers flatten â€” phone layout unchanged */
.studio-configure { display: block; }
.studio-main { display: contents; }
.studio-rail { display: contents; }
.still-panel-side { display: contents; }

/* Same fonts as CiaoClips site: DM Sans UI + Fraunces titles */
.batch-page,
.batch-page-lite,
.still-create,
.batch-flow,
.studio-configure,
.modality-picker-wrap {
  font-family: var(--font) !important;
}
.batch-page .batch-topbar-title h2,
.batch-page-lite .batch-topbar-title h2 {
  font-family: var(--font-display) !important;
  font-weight: 560;
  letter-spacing: -0.03em;
}
.batch-page .batch-topbar-title p,
.batch-section-head,
.batch-section-head h3,
.batch-section-head > span,
.batch-field-label,
.creative-step-lead,
.lang-step-lead,
.btn,
.lang-chip,
.dur-tick,
.upload-zone,
.launch-estimate,
.batch-simple-toggle,
.batch-more-tab,
.create-path-lead,
.create-path-card {
  font-family: var(--font) !important;
}
.batch-section-head h3,
.batch-section-head > span:not(.batch-step):not(.batch-badge) {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Desktop PC (â‰¥769px): same breakpoint as sidebar shell.
   Beats .batch-page { max-width: 560px } + legacy .batch-flow 2-col.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (min-width: 769px) {
  /* Kill the â€œphone column in a white seaâ€ */
  .view:has(.batch-page) {
    align-items: stretch !important;
    max-width: none !important;
    width: 100% !important;
    padding: 1.25rem 2rem 2rem !important;
    background: #f3f4f6;
  }
  .view:has(.batch-page) > .batch-page,
  .batch-page,
  .batch-page-lite,
  .batch-lite,
  .still-create {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Critical: legacy style.css made .batch-flow a 2-col grid â€”
     a single child (chooser/studio) sat in the LEFT half only. */
  .batch-page-chooser .batch-flow,
  .batch-page-studio .batch-flow,
  .batch-page-still .batch-flow,
  .batch-flow:has(.studio-configure),
  .batch-flow:has(.create-path-chooser),
  .batch-flow:has(.still-create-body) {
    display: block !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: none !important;
  }

  .batch-page-lite .batch-topbar-title h2 {
    font-family: var(--font-display) !important;
    font-size: 1.75rem;
    font-weight: 560;
    letter-spacing: -0.03em;
  }
  .batch-page-lite .batch-topbar-title p {
    display: block !important;
    font-size: 0.9rem;
    color: #64748b;
  }

  /* â”€â”€ Chooser: full-width horizontal strip â”€â”€ */
  .batch-page-chooser .create-path-chooser {
    max-width: none !important;
    width: 100% !important;
    margin: 0.5rem 0 0 !important;
  }
  .batch-page-chooser .create-path-lead {
    text-align: left;
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  .batch-page-chooser .create-path-grid,
  .batch-page-chooser .create-path-grid-lite {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
  }
  .batch-page-chooser .create-path-card {
    min-height: 140px;
    padding: 1.25rem 1.35rem !important;
    border-radius: 14px !important;
    order: 0 !important;
    width: 100% !important;
  }
  .batch-page-chooser .create-path-card-hero {
    order: 0 !important;
  }
  .batch-page-chooser .create-path-card strong {
    font-family: var(--font-display) !important;
    font-size: 1.15rem !important;
  }
  .batch-page-chooser .create-path-ico {
    width: 2.2rem;
    height: 2.2rem;
    margin-bottom: 0.3rem;
  }

  /* Modality templates: wide */
  .modality-picker-wrap { width: 100%; }
  .modality-your-prompt {
    max-width: none;
    width: 100%;
    padding: 1.35rem 1.5rem;
    border-radius: 16px;
  }
  .modality-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .modality-card {
    flex: 0 0 calc((100% - 2rem) / 3) !important;
    width: calc((100% - 2rem) / 3) !important;
    max-width: calc((100% - 2rem) / 3) !important;
    border-radius: 14px;
  }

  /* â”€â”€ Generate studio forms â”€â”€ */
  .batch-page-studio {
    min-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
  }
  .batch-page-studio .batch-flow {
    flex: 1;
    width: 100%;
  }
  .batch-page-studio .batch-topbar {
    margin-bottom: 1.1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .batch-page-studio:not(.batch-page-still) .studio-configure > .batch-section,
  .batch-page-studio:not(.batch-page-still) .studio-main > .batch-section,
  .batch-page-studio:not(.batch-page-still) .studio-rail .batch-section,
  .batch-page-studio .still-panel.batch-section,
  .batch-page-studio .still-panel-side > .batch-section,
  .batch-page-studio:not(.batch-page-still) .batch-step-creative {
    margin: 0;
    padding: 1.3rem 1.45rem !important;
    border-radius: 16px !important;
    border: 1px solid rgba(15, 23, 42, 0.07) !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 12px 28px rgba(15, 23, 42, 0.05) !important;
  }

  .batch-page-studio .batch-section-head > span:not(.batch-step):not(.batch-badge),
  .batch-page-studio .batch-section-head h3 {
    font-family: var(--font) !important;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .batch-page-studio .batch-launch-sticky .btn-generate,
  .batch-page-studio .still-panel-launch .btn-generate {
    min-height: 56px !important;
    border-radius: 14px !important;
    font-size: 1.05rem !important;
    font-weight: 750 !important;
  }

  /* VIDEO desk PC:
     row1: Upload | Prompt | How long | Language  (horizontal)
     row2: More options
     row3: Generate (full width, under everything) */
  .batch-page-studio:not(.batch-page-still) .studio-main { display: contents; }
  .batch-page-studio:not(.batch-page-still) .studio-configure {
    display: grid;
    grid-template-columns:
      minmax(180px, 0.85fr)
      minmax(260px, 1.35fr)
      minmax(200px, 0.85fr)
      minmax(220px, 260px);
    grid-template-rows: auto auto auto;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-upload {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-creative {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-width: none;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-creative .batch-step-body {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-duration {
    grid-column: 3;
    grid-row: 1;
    height: auto !important;
  }
  /* Language on the right — compact flag chips */
  .batch-page-studio:not(.batch-page-still) .batch-step-lang {
    grid-column: 4;
    grid-row: 1;
    height: auto !important;
    padding: 0.85rem 0.75rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-section-more {
    grid-column: 1 / -1;
    grid-row: 2;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .batch-page-studio .batch-more-tab {
    font-size: 0.95rem !important;
    padding: 0.65rem 1.15rem 0.65rem 1rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .studio-rail {
    display: block;
    grid-column: 1 / -1;
    grid-row: 3;
    position: static;
    z-index: 2;
    max-width: none;
  }
  .batch-page-studio:not(.batch-page-still) .studio-rail .batch-launch {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.15rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .studio-rail .launch-estimate {
    order: 0;
    text-align: center;
    margin: 0 !important;
    font-size: 0.85rem;
  }
  .batch-page-studio:not(.batch-page-still) .studio-rail .btn-generate {
    order: 1;
    width: 100%;
    max-width: none;
  }

  /* Prompt-only: Prompt | How long | Language (right, compact) */
  .batch-page-studio:not(.batch-page-still) .studio-configure:has(.batch-step-upload.hidden) {
    grid-template-columns:
      minmax(300px, 1.4fr)
      minmax(220px, 0.9fr)
      minmax(220px, 260px);
  }
  .batch-page-studio:not(.batch-page-still) .studio-configure:has(.batch-step-upload.hidden) .batch-step-creative {
    grid-column: 1;
    grid-row: 1;
    min-height: 200px;
    max-width: none;
  }
  .batch-page-studio:not(.batch-page-still) .studio-configure:has(.batch-step-upload.hidden) .batch-step-duration {
    grid-column: 2;
    grid-row: 1;
  }
  .batch-page-studio:not(.batch-page-still) .studio-configure:has(.batch-step-upload.hidden) .batch-step-lang {
    grid-column: 3;
    grid-row: 1;
  }
  .batch-page-studio:not(.batch-page-still) .studio-configure:has(.batch-step-upload.hidden) .batch-section-more {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .batch-page-studio:not(.batch-page-still) .studio-configure:has(.batch-step-upload.hidden) .studio-rail {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  /* Compact flag chips in the right language column */
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .lang-step-lead,
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .lang-uses,
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .lang-uses-foot {
    display: none;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .batch-field-label {
    font-size: 0.7rem !important;
    margin-bottom: 0.3rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .video-lang-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0.28rem !important;
    margin: 0 0 0.45rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .video-lang-chip {
    min-height: 0 !important;
    padding: 0.3rem 0.15rem !important;
    border-radius: 8px !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .video-lang-chip .lang-flag {
    font-size: 1.15rem !important;
    margin: 0 !important;
    display: block !important;
    line-height: 1;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .video-lang-chip .lang-name {
    display: none !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .video-lang-chip .lang-code {
    display: block !important;
    font-size: 0.58rem !important;
    margin-top: 0.1rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .batch-simple-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.25rem;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .batch-simple-toggle {
    padding: 0.35rem 0.4rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .batch-simple-toggle strong {
    font-size: 0.75rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang .batch-simple-toggle small {
    display: block !important;
    font-size: 0.65rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang #translateTargets .lang-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.28rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang #translateTargets .lang-chip {
    min-height: 0 !important;
    padding: 0.3rem 0.15rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang #translateTargets .lang-name {
    display: none !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang #translateTargets .lang-flag {
    font-size: 1.05rem !important;
  }
  .batch-page-studio:not(.batch-page-still) .batch-step-lang #translateTargets .lang-code {
    font-size: 0.55rem !important;
  }

  .batch-page-studio #scratchPromptInput,
  .batch-page-studio #creativeNoteInput {
    flex: 1;
    min-height: 120px;
    max-height: 220px;
    font-size: 0.95rem;
  }
  .batch-page-studio .upload-zone-hero {
    min-height: 8rem;
    border-radius: 14px;
  }

  .batch-page-studio .create-chosen-pill {
    margin: 0 0 0.85rem !important;
  }

  .batch-page-studio .batch-launch-sticky .btn-generate {
    min-height: 52px !important;
    font-size: 1.05rem !important;
    border-radius: 14px !important;
  }

  /* STILL image: same PC desk as video
     row1: Photo | Edit | Format
     row2: More options (tab)
     row3: Generate full width */
  .batch-page-still .still-create-body.studio-configure {
    display: grid;
    grid-template-columns:
      minmax(200px, 0.9fr)
      minmax(280px, 1.4fr)
      minmax(220px, 0.9fr);
    grid-template-rows: auto auto auto;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
  }
  .batch-page-still .still-panel-media {
    grid-column: 1;
    grid-row: 1;
  }
  .batch-page-still .still-panel-prompt {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .batch-page-still .still-panel-format {
    grid-column: 3;
    grid-row: 1;
  }
  .batch-page-still .still-panel-more,
  .batch-page-still .batch-section-more {
    grid-column: 1 / -1;
    grid-row: 2;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .batch-page-still .still-panel-launch-wrap,
  .batch-page-still .studio-rail {
    grid-column: 1 / -1;
    grid-row: 3;
    display: block;
    position: static;
    max-width: none;
  }
  .batch-page-still .still-panel-launch {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.15rem !important;
  }
  .batch-page-still .still-panel-launch .launch-estimate {
    order: 0;
    text-align: center;
    margin: 0 !important;
  }
  .batch-page-still .still-panel-launch .btn-generate {
    order: 1;
    width: 100%;
  }

  /* Text to image: Prompt | Format → More → Generate */
  .batch-page-still .still-create-text .still-create-body.studio-configure {
    grid-template-columns:
      minmax(320px, 1.5fr)
      minmax(240px, 0.9fr);
  }
  .batch-page-still .still-create-text .still-panel-prompt {
    grid-column: 1;
    grid-row: 1;
  }
  .batch-page-still .still-create-text .still-panel-format {
    grid-column: 2;
    grid-row: 1;
  }

  .batch-page-still .still-panel.batch-section,
  .batch-page-still .still-panel-format.batch-section,
  .batch-page-still .still-panel-prompt.batch-section,
  .batch-page-still .still-panel-media.batch-section {
    margin: 0;
    padding: 1.3rem 1.45rem !important;
    border-radius: 16px !important;
    border: 1px solid rgba(15, 23, 42, 0.07) !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 12px 28px rgba(15, 23, 42, 0.05) !important;
  }
  .batch-page-still .still-panel-prompt #imgPrompt,
  .batch-page-still .still-panel-prompt .creative-input {
    flex: 1;
    min-height: 120px;
    max-height: 220px;
    font-size: 0.95rem;
  }
  .batch-page-still .still-panel-format select {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
  }
  .batch-page-still .preset-chips,
  .batch-page-still .still-edit-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .batch-page-still .still-edit-chip {
    flex: 0 1 auto;
    min-width: 4.8rem;
    text-align: center;
  }
  .batch-page-still .img-preview {
    max-height: min(28vh, 240px);
    border-radius: 12px;
    background: #f1f5f9;
  }
  .batch-page-still .upload-zone {
    min-height: 7rem;
  }

  /* Plans */
  .billing-page { max-width: 1200px; }
  .billing-desktop .billing-masthead {
    padding: 1.5rem 2rem;
    border-radius: 18px;
    background: #0f172a;
    border: none;
    color: #f8fafc;
    margin-bottom: 1.75rem;
  }
  .billing-desktop .billing-masthead-title {
    font-family: var(--font-display), Georgia, serif;
    font-size: 2rem;
    font-weight: 560;
    color: #fff;
  }
  .billing-desktop .billing-masthead-lead { color: rgba(248, 250, 252, 0.65); }
  .billing-desktop .billing-balance {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    text-align: left;
  }
  .billing-desktop .billing-balance strong { color: #fff; font-size: 1.85rem; }
  .billing-desktop .pack-card,
  .billing-desktop .plan-card {
    border-radius: 16px;
    min-height: 170px;
  }
  .billing-desktop .pack-cta,
  .billing-desktop .plan-card .btn-primary {
    background: #0f172a;
    border-color: #0f172a;
  }
}
