/* =========================================================
   IceCream Tones – THEME (2026-10-26, gold)
   The same colours as the landing page index.html:
     BLUE = listeners: browse, preview, buy   (Catalogue, Cart, Thanks,
            Creators pages, Sign in)
     GOLD on SLATE VIOLET = creators: upload, sell, plans, tips
            (My Lists, Dashboard, and the Tip box on a creator's page)
   Easy on the eyes: big areas stay dark or calm violet; gold is used only
   for buttons, numbers, thin borders and small highlights.

   Loaded AFTER css/style.css (and css/dashboard.css), so it only changes
   colours, fonts, borders and corners. No JavaScript or payment code
   depends on this file. To go back: remove the theme.css line from a page.
   ========================================================= */

/* ---------- 1. Colours (all from index.html) ---------- */
:root {
  /* shared */
  --header: #00002B;     /* top bar = logo background */
  --night:  #07081A;     /* page background */
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --lilac:  #E6E8FA;     /* soft text */
  --grey:   #B4B6DC;     /* meta text */
  --danger: #FFB3B3;

  /* listeners: blue */
  --blue-panel: #10106E; /* cards / panels (landing "Browse Catalogue" card) */
  --blue-row:   #1B1B8A; /* track rows, inputs inside blue panels */
  --blue:       #3D63F0; /* buttons, active, step numbers */
  --blue-line:  #2E3399; /* thin borders */

  /* creators: slate violet + gold (landing "Become a creator" card) */
  --warm-panel: #575780; /* cards / panels */
  --warm-row:   #46466E; /* rows, inputs inside violet panels */
  --orange:     #E7BF13; /* GOLD: buttons, accents, step numbers (name kept so nothing breaks) */
  --orange-line: #C9A41C;/* thin gold borders (a touch softer than the buttons) */
  --on-orange:  #1A1400; /* dark text on gold */
  --gold-soft:  #FFF3C4; /* light "attention" boxes */

  /* the old names used by style.css now point to the LISTENER colours */
  --navy:   var(--blue-panel);
  --navy-2: var(--blue-row);
  --royal:  var(--blue);
  --sun:    var(--blue);          /* main buttons on listener pages are blue */
  --on-sun: #fff;
  --line:   var(--blue-line);
  --rose:   var(--warm-panel);
  --rose-light: #EEEFF8;
}

/* Creator pages: the same names now point to the VIOLET + GOLD colours */
body[data-page="my-lists"],
body[data-page="dashboard"] {
  --navy:   var(--warm-panel);
  --navy-2: var(--warm-row);
  --royal:  var(--orange);
  --sun:    var(--orange);
  --on-sun: var(--on-orange);
  --line:   var(--orange-line);
  --blue:   var(--orange);        /* "active" things turn gold too */
}

body { font-family: var(--font); background: var(--night); }

/* ---------- 2. Header + menu ---------- */
.app-header { background: var(--header); border-bottom-color: #1C1F4A; }
.app-nav { background: var(--header); border-top-color: #1C1F4A; }
/* the page you are on: GOLD icon + GOLD underline on every page */
.nav-link.active svg { stroke: var(--orange); }
@media (min-width: 900px) {
  .app-nav { background: none; }
  .nav-link.active { border-bottom-color: var(--orange); }
}
/* the two creator links always carry a little orange, wherever you are */
.nav-link[href="my-lists.html"] svg, .nav-link[href="dashboard.html"] svg { stroke: var(--orange); }
.cart-count { background: var(--blue); color: #fff; }
/* "Sign in" button in the header: GOLD on every page */
.account-chip:not(:has(img, .chip-initial)) { background: var(--orange); color: var(--on-orange); }
/* signed in (picture + name, e.g. "S.A.E."): ALWAYS dark blue, the same on every page.
   Fixed colours on purpose, so later colour changes never touch this button. */
.account-chip:has(img, .chip-initial) { background: #10106E; color: #fff; }
.account-chip .chip-initial { background: #3D63F0; color: #fff; }

/* ---------- 3. Titles and buttons ---------- */
.page-title { font-size: 26px; font-weight: 900; }
@media (min-width: 900px) { .page-title { font-size: 32px; } }
h2, h3 { font-weight: 800; }

.btn { border-radius: 999px; font-weight: 800; min-height: 44px; }
.btn:hover { filter: brightness(1.08); }
.btn-sun, .btn-royal { background: var(--sun); color: var(--on-sun); }
.btn-ghost { border-radius: 999px; }
.btn-add, .btn-download { background: var(--sun); color: var(--on-sun); border-radius: 999px; font-weight: 800; }
.btn-add.in-cart { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px var(--sun); }
.link-light { color: var(--sun); }
body:not([data-page="my-lists"]):not([data-page="dashboard"]) .link-light { color: #9DB1FF; }
.link-btn { color: var(--sun); }

/* ---------- 4. Panels and track rows ---------- */
.list-panel, .themes, .signed-in-bar, .need-signin, .profile-hero, .creator-card {
  border: 1px solid var(--line); border-radius: 20px;
}
.track { border-radius: 14px; }
.track.selected, .my-tracks .track:hover { filter: brightness(1.18); }
.theme-btn { border-radius: 14px; }
.theme-btn[aria-pressed="true"] { background: var(--blue); border-color: #7D95FF; }
.pager button { border-color: var(--line); border-radius: 999px; }
.pager button[aria-current="page"] { background: var(--blue); border-color: #7D95FF; }
.btn-random { border-radius: 999px; border-color: #7D95FF; background: var(--blue); }
.list-head select { border-color: var(--line); }
.usage-bar span { background: var(--sun); }
.progress span { background: linear-gradient(90deg, var(--orange), #F7DC5C); }
.choices, .sum .sum-total { border-color: var(--line); }
.choice input:checked + span::before { border-color: var(--blue); background: radial-gradient(circle, var(--blue) 0 45%, transparent 50%); }
.pay-card { background: var(--blue); color: #fff; }
.pay-buttons [data-pay].chosen { outline-color: #9DB1FF; }

/* ---------- 5. MY LISTS (gold) ---------- */
.tab-files,  .folder-files  { --folder: var(--warm-panel); --edge: var(--orange-line); }
.tab-upload, .folder-upload { --folder: #44446B;           --edge: var(--orange-line); }
/* one thin orange outline around the whole folder: tab top + left, the
   bright slanted tab edges, then down the sides and around the bottom */
.folder-panel { border: 1px solid var(--orange-line); border-top: 0; border-radius: 0 0 20px 20px; margin-top: -1px; }
.tab {
  border-radius: 20px 0 0 0;               /* same round corner as the folder's bottom */
  /* the colour behind the tab shows only as the slanted edge line, never at the bottom */
  background: linear-gradient(to bottom, var(--edge) calc(100% - 1px), var(--folder) 0);
  clip-path: polygon(0 0, calc(100% - 52px) 0, 100% 100%, 0 100%);
}
.tab::before {                              /* the tab's face: 1px smaller on the slant = a 1px edge line */
  border-radius: 19px 0 0 0;
  clip-path: polygon(0 0, calc(100% - 53.4px) 0, calc(100% - 1px) 100%, 0 100%);
}
.tab-files { border-top: 1px solid var(--orange-line); border-left: 1px solid var(--orange-line); }
.tab-upload[aria-selected="true"] { border-top: 1px solid var(--orange-line); }
.folder-head .usage-bar { background: rgba(255,255,255,.1); }
.drop { background: #3A3A60; border-color: var(--orange); border-radius: 18px; }
.up-preview { border-color: var(--orange-line); }
.on-dark .field input, .on-dark .field select, .on-dark .field textarea { background: var(--warm-row); border-color: #75759E; }
.plan-note.live { background: #0E2A22; border: 1px solid #2C6B52; }
.plan-note a, .my-tracks.drafts .track-meta::after { color: var(--orange); }
.plan-box { background: var(--gold-soft); color: #2A2200; border-radius: 20px; }
.plan-box .btn-royal { background: var(--orange); color: var(--on-orange); }
.balloon { box-shadow: 0 14px 40px rgba(0,0,0,.55), 0 0 0 3px var(--orange); }
.balloon::before { box-shadow: -3px -3px 0 0 var(--orange); }
.balloon.above::before { box-shadow: 3px 3px 0 0 var(--orange); }
.balloon .btn-sun { background: var(--orange); color: var(--on-orange); }

/* ---------- 6. DASHBOARD (gold) ---------- */
.card-light, .dash-page > .zone {
  background: var(--warm-panel); color: #fff; border: 1px solid var(--orange-line); border-radius: 22px;
}
.card-light .field input, .card-light .field select, .card-light .field textarea {
  background: var(--warm-row); color: #fff; border-color: #75759E;
}
.card-light .field .hint, .hint-dark, .hint-line { color: var(--lilac); }
.avatar-button { background: #44446B; }
.dash-page > .zone > h2, .dash-page > .zone > h3, .dash-page > .zone .rules h3 { color: #fff; }
.dash-page > .zone small, .dash-page > .zone > p { color: var(--lilac); }
.dash-page > .zone .stripe-box { background: var(--rose-light); border-color: #75759E; border-radius: 16px; color: #10103A; }
.dash-page > .zone .stripe-box .plan-status { color: #10103A; }
.dash-page > .zone .stripe-box .link-btn { color: #6A5200; }
.dash-page > .zone .plan { background: #F4F5FB; border-color: #75759E; border-radius: 16px; color: #10103A; }
.dash-page > .zone .plan span { color: #4A4A72; }
.dash-page > .zone .plan:has(input:checked) { background: #fff; box-shadow: 0 0 0 3px var(--orange); border-color: var(--orange); }
.plan input, .auth-check input { accent-color: var(--orange); }
.dash-page > .zone .rules { background: #46466E; color: #fff; border: 1px solid #6E6E99; }
.tips span { background: var(--orange); color: var(--on-orange); }
.dash-page > .zone .pw-box { background: rgba(255,255,255,.06); }
.dash-page > .zone .terminate { border-top-color: #6E6E99; }
.form-msg.bad, .auth-msg.bad { color: #FF9C9C; }
.form-msg.good, .auth-msg.good { color: #7FE3A6; }
.guest-banner { background: var(--gold-soft); color: #2A2200; border-radius: 20px; }

/* ---------- 7. SIGN IN (blue, with an gold "become a creator" card) ---------- */
.auth-card { background: var(--blue-panel); color: #fff; border: 1px solid var(--blue-line); border-radius: 22px; }
.auth-card .field input { background: var(--blue-row); color: #fff; border-color: #3A3F9A; }
.auth-tabs button { background: var(--blue-row); color: var(--lilac); border-radius: 999px; }
.auth-tabs button[aria-selected="true"] { background: var(--blue); color: #fff; }
.why-card { background: var(--warm-panel); color: #fff; border: 1px solid var(--orange-line); border-radius: 20px; }
.dev-link { background: #E9EDFF; color: #10106E; }

/* ---------- 8. CREATOR PAGE: blue page, gold Tip box ---------- */
.creator-badge { background: var(--orange); color: var(--on-orange); }
#creator-page .hero-actions .btn-sun { background: var(--orange); color: var(--on-orange); }
.tip-box { background: var(--warm-panel); color: #fff; border: 1px solid var(--orange-line); border-radius: 22px; }
.tip-box > p { color: var(--lilac); }
.tip-amounts span { background: transparent; color: #fff; border: 1.5px solid #4A4A72; border-radius: 999px; }
.tip-amounts input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.tip-amounts input:focus-visible + span { outline-color: var(--orange); }
.tip-box .field label { color: #fff; }
.tip-box .field input, .tip-box .field textarea { background: var(--warm-row); color: #fff; border-color: #75759E; }
.tip-box .tip-pay-label { color: #fff; }
.tip-box .pay-card { background: var(--orange); color: var(--on-orange); }
.tip-box .pay-buttons [data-pay].chosen { outline-color: var(--orange); }

/* ---------- 9. CART: light "commons" box in blue ---------- */
.commons { background: #E9EDFF; color: #10106E; }
.commons input { accent-color: var(--blue); }

/* ---------- 10. small things ---------- */
.toast { border-radius: 999px; }
:focus-visible { outline-color: #9DB1FF; }
body[data-page="my-lists"] :focus-visible, body[data-page="dashboard"] :focus-visible, .tip-box :focus-visible { outline-color: var(--orange); }

/* ---------- 11. Catalogue header, ONE line:  All themes · [Randomize] · Sort: [Newest] ----------
   Sizes are RELATIVE (they grow and shrink with the screen width).
   Computers / tablets: icon + "Randomize", "Sort:" + list.
   Phones (under 600px): the button says "Randomize" ("Random" under 390px), the word "Sort:" is hidden.
   Only tiny phones (under 330px): the shuffle ICON only.
   Screen readers always hear "Shuffle tones" and "Sort". */
.list-panel > .list-head { flex-wrap: nowrap; align-items: center; gap: clamp(6px, 2vw, 12px); }
.list-panel > .list-head h2 { order: 1; flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0;
  font-size: clamp(16px, 4.6vw, 24px); }
.list-panel > .list-head .btn-random { order: 2; flex: none; white-space: nowrap;
  min-height: clamp(34px, 9vw, 44px); padding: 0 clamp(10px, 3vw, 18px); font-size: clamp(13px, 3.6vw, 16px); gap: 6px; }
.list-panel > .list-head > label.muted { order: 3; flex: 0 1 auto; min-width: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.list-panel > .list-head > label.muted select { min-height: clamp(34px, 9vw, 44px); font-size: clamp(13px, 3.6vw, 16px); max-width: 100%; }
@media (max-width: 599px) {
  .list-panel > .list-head { padding-left: 4px; padding-right: 4px; }
  /* phones: the button shows the short word "Random" (no icon) */
  .list-panel > .list-head .btn-random { font-size: 0; gap: 0; }
  .list-panel > .list-head .btn-random svg { display: none; }
  .list-panel > .list-head .btn-random::after { content: "Randomize"; font-size: clamp(13px, 3.8vw, 16px); }
  .list-panel > .list-head > label.muted { font-size: 0; gap: 0; }  /* hides the word "Sort:" */
  .list-panel > .list-head > label.muted select { padding: 4px 4px; width: 100%; max-width: 32vw; min-width: 76px; }
}
@media (max-width: 389px) {   /* small phones: the short word */
  .list-panel > .list-head .btn-random::after { content: "Random"; }
}
@media (max-width: 329px) {
  .list-panel > .list-head .btn-random { width: 36px; padding: 0; justify-content: center; }
  .list-panel > .list-head .btn-random::after { content: none; }
  .list-panel > .list-head .btn-random svg { display: block; width: 19px; height: 19px; }
}

/* ---------- 12. Dashboard "3 steps" (new Dashboard) ---------- */
.creator-benefits { background: var(--warm-panel); color: #fff; border: 1px solid var(--orange-line); border-radius: 22px; }
.creator-benefits b { color: var(--orange); }
.step-track .dot { background: #46466E; color: #fff; }
.step-track li.current .dot { background: var(--orange); color: var(--on-orange); }
.step-track li.done .dot { background: #2F8F5B; color: #fff; }
.step-label { color: var(--orange); }
.step-plans.is-locked .plans-body { opacity: .45; }
.stripe-info { color: #fff; }
.stripe-info a, .stripe-agree a, .lock-note a { color: var(--orange); }

/* ---------- 13. Dashboard, Stripe box: country code and flag side by side ("LV ▬") ---------- */
#identity-form .country-input { display: inline-flex; width: fit-content; min-width: 0; gap: 8px; padding: 0 12px; }
#identity-form .country-input input { flex: none; width: 1.5em; min-width: 0; padding: 0; }
#identity-form .country-input .flag { margin-left: 0; }
#identity-form .country-input .eg { display: none; }

/* ---------- 14. Creators Dashboard: DARK BLUE panels (like the Catalogue), gold accents stay ---------- */
body[data-page="dashboard"] {
  --warm-panel: var(--blue-panel);   /* #10106E  panels */
  --warm-row:   var(--blue-row);     /* #1B1B8A  inputs and rows */
}
body[data-page="dashboard"] .card-light .field input,
body[data-page="dashboard"] .card-light .field select,
body[data-page="dashboard"] .card-light .field textarea { border-color: #3A3F9A; }
body[data-page="dashboard"] .avatar-button { background: var(--blue-row); }
body[data-page="dashboard"] .step-track .dot { background: var(--blue-row); }
body[data-page="dashboard"] .dash-page > .zone .rules { background: var(--blue-row); border-color: #3A3F9A; }
body[data-page="dashboard"] .dash-page > .zone .terminate { border-top-color: #3A3F9A; }
/* Dashboard guest box ("You are looking around as a guest"): dark blue, like the panels */
body[data-page="dashboard"] .guest-banner { background: var(--blue-panel); color: #fff; border: 1px solid var(--blue-line); }
body[data-page="dashboard"] .guest-banner h2 { color: #fff; }
body[data-page="dashboard"] .guest-banner p { color: var(--lilac); }
body[data-page="dashboard"] .guest-banner .btn-sun,
body[data-page="dashboard"] .guest-banner .btn-royal { background: #3D63F0; color: #fff; }
body[data-page="dashboard"] .guest-banner .btn-ghost { color: #fff; border-color: #fff; }
body[data-page="dashboard"] .guest-banner a:not(.btn) { color: var(--orange); }

/* ---------- 15. Tone icon: a MUSIC NOTE instead of the first letter ----------
   Shown on every tone that has no picture of its own (Catalogue, Cart, creator
   pages, My Lists, the upload preview and the edit balloon). A tone WITH its own
   picture still shows that picture. Only this file changes: no JavaScript. */
.track-play > span:not(:has(img)),
.balloon-icon:not(:has(img)) { font-size: 0; display: grid; place-items: center; }
.track-play > span:not(:has(img))::before,
.balloon-icon:not(:has(img))::before {
  content: ""; width: 24px; height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300002b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l11-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.balloon-icon:not(:has(img))::before { width: 30px; height: 30px; }

/* ---------- 16. MY LISTS in harmony ----------
   Three colours only, taken from the My Lists screenshots:
     NAVY   #10106E  = the folders (both panels look the same)
     VIOLET #46466E  = things you touch: tone rows and input fields
     MIDDLE #2A2A7A  = the tab at the back, the drop zone, empty bars
   plus GOLD for buttons and thin borders. */
body[data-page="my-lists"] .tab-files,  body[data-page="my-lists"] .folder-files,
body[data-page="my-lists"] .tab-upload, body[data-page="my-lists"] .folder-upload { --folder: #10106E; --edge: var(--orange-line); }
body[data-page="my-lists"] .tab[aria-selected="false"]::before { background: #2A2A7A; }
body[data-page="my-lists"] .tab[aria-selected="false"] span { color: var(--lilac); opacity: 1; }
body[data-page="my-lists"] .my-tracks .track { background: #46466E; }
body[data-page="my-lists"] .my-tracks .track:hover { background: #50507A; filter: none; }
body[data-page="my-lists"] .on-dark .field input,
body[data-page="my-lists"] .on-dark .field select,
body[data-page="my-lists"] .on-dark .field textarea,
body[data-page="my-lists"] .folder-panel .field input,
body[data-page="my-lists"] .folder-panel .field select { background: #46466E; border-color: #68688D; color: #fff; }
body[data-page="my-lists"] .folder-panel .field input::placeholder { color: #B4B6DC; }
body[data-page="my-lists"] .drop { background: #2A2A7A; border-color: var(--orange-line); }
body[data-page="my-lists"] .progress,
body[data-page="my-lists"] .folder-head .usage-bar { background: #2A2A7A; }
body[data-page="my-lists"] .signed-in-bar { background: #10106E; }

/* ---------- 17. MY LISTS info blocks shaped like small FOLDERS ----------
   "Signed in as …" and the green note get a little folder tab on top-left
   (same slanted edge and thin line as the big folders below them). */
body[data-page="my-lists"] .signed-in-bar { --face: #10106E; --rim: var(--orange-line); }
body[data-page="my-lists"] .plan-note     { --face: #0E2A22; --rim: #2C6B52; }
body[data-page="my-lists"] .signed-in-bar,
body[data-page="my-lists"] .plan-note {
  position: relative; background: var(--face); border: 1px solid var(--rim);
  border-radius: 0 16px 16px 16px; margin-top: 22px;
}
body[data-page="my-lists"] .signed-in-bar::before, body[data-page="my-lists"] .signed-in-bar::after,
body[data-page="my-lists"] .plan-note::before,     body[data-page="my-lists"] .plan-note::after {
  content: ""; position: absolute; left: -1px; bottom: 100%; width: 132px; height: 12px;
  border-radius: 12px 0 0 0; pointer-events: none;
}
/* the tab's outline (thin line on top, left and the slanted edge) */
body[data-page="my-lists"] .signed-in-bar::before,
body[data-page="my-lists"] .plan-note::before {
  background: var(--rim); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 100%, 0 100%);
}
/* the tab's face, 1px smaller, joined to the block below without a line */
body[data-page="my-lists"] .signed-in-bar::after,
body[data-page="my-lists"] .plan-note::after {
  left: 0; width: 130px; height: 12px; bottom: calc(100% - 1px); border-radius: 11px 0 0 0;
  background: var(--face); clip-path: polygon(0 1px, calc(100% - 16.3px) 1px, 100% 100%, 0 100%);
}

/* ---------- 18. PAYMENT FORM on the autumn picture (Cart, Tips, Creator plans) ----------
   The autumn photo (images/pay-autumn.jpg: pale sky blue + yellow leaves) frames the
   payment. Stripe's own form sits on a clean WHITE card on top, so all Stripe
   texts, rules and buttons keep full contrast. */
.pay-embed {
  background: linear-gradient(rgba(232,234,248,.35), rgba(232,234,248,.35)),
              url("../images/pay-autumn.jpg") center / cover no-repeat, #DDE0F2;
  color: #10103A; border: 1px solid #C9A41C; border-radius: 20px;
  padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.pay-embed-head {                     /* "Pay … " + Cancel, on a soft white band */
  background: rgba(255,255,255,.88); border-radius: 12px; padding: 8px 12px;
  margin: 0 0 10px; color: #10103A; font-weight: 800;
}
.pay-embed-close { color: #10106E !important; font-weight: 800; }
.pay-embed-frame {                    /* Stripe's form: white card = best contrast */
  background: #fff; border-radius: 14px; padding: 12px;
  box-shadow: 0 2px 10px rgba(16,16,58,.18);
}
.pay-embed-note {
  background: rgba(255,255,255,.88); border-radius: 10px; padding: 6px 10px;
  margin: 10px 0 0; color: #2E2D3A;
}
.pay-embed-error { color: #B00020; }
@media (max-width: 480px) { .pay-embed { padding: 8px; } .pay-embed-frame { padding: 6px; } }

/* ---------- 19. Terms of Service / Privacy Policy: tick boxes, notes, footer ---------- */
.agree { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.agree input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #E7BF13; }
.agree a, .legal-note a { color: inherit; text-decoration: underline; font-weight: 700; }
.agree.agree-missing { outline: 2px solid #E7BF13; outline-offset: 6px; border-radius: 8px; }
.is-creator #agree-plan-box { display: none; }   /* plan already active: no need to agree again */
.legal-note { margin: 10px 0 0; font-size: 12.5px; color: var(--lilac); line-height: 1.45; }
.legal-footer {
  text-align: center; font-size: 12.5px; color: var(--grey); line-height: 1.9;
  padding-block: 28px 18px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.legal-footer a { color: var(--lilac); }
