/* ============================================================
   Fridjy — "Bright" light theme (trial).
   Overrides ONLY the light-mode colour variables so the whole
   site reads bright/white instead of warm cream. Layouts, logic
   and dark mode are untouched (dark is scoped out below).

   TO REVERT: empty this file (or delete its contents) and the
   original warm-cream palette returns everywhere. Nothing else
   needs changing.
   ============================================================ */

/* Self-hosted Inter (variable) — the app declares 'Inter' everywhere but never
   loaded it, so most users saw a fallback. CSP-safe (font-src 'self'). */
@font-face{
  font-family:'Inter';
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('/fonts/inter-latin.woff2') format('woff2');
}

/* applies when the OS prefers light AND no manual dark theme is set */
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    --bg:#ffffff;
    --bg-2:#f6f7f8;
    --card:#ffffff;
    --card-2:#fafbfc;
    --line:rgba(18,20,24,.12);
    --line-2:rgba(18,20,24,.20);
    --text:#141619;
    --muted:#474c54;
    --muted-2:#697079;
    --surface:rgba(18,20,24,.045);
    --surface-2:rgba(18,20,24,.08);
    --nav-bg:rgba(255,255,255,.85);
    --cook-bg:#ffffff;
    --green:#2f9e50;
    --shadow:0 10px 28px -12px rgba(18,20,24,.18);
  }
}
/* applies when the user has explicitly chosen the light theme */
:root[data-theme="light"]{
  --bg:#ffffff;
  --bg-2:#f6f7f8;
  --card:#ffffff;
  --card-2:#fafbfc;
  --line:rgba(18,20,24,.12);
  --line-2:rgba(18,20,24,.20);
  --text:#141619;
  --muted:#474c54;
  --muted-2:#697079;
  --surface:rgba(18,20,24,.045);
  --surface-2:rgba(18,20,24,.08);
  --nav-bg:rgba(255,255,255,.85);
  --cook-bg:#ffffff;
  --green:#2f9e50;
  --shadow:0 10px 28px -12px rgba(18,20,24,.18);
}

/* ============================================================
   VIVID accents — the low-opacity tints look pale on white, so
   punch them up. Light-mode only (dark keeps its own treatment).
   ============================================================ */
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]) .cooknow-banner{
    background:linear-gradient(135deg,#e4f6e9,#fff1e8);
    border-color:rgba(30,160,70,.42);
  }
  :root:not([data-theme="dark"]) .cooknow-banner .cn-n{ color:#0f8a3a; }

  /* colourful icon chips on the import tiles */
  :root:not([data-theme="dark"]) .imp .ico{
    display:inline-grid;place-items:center;width:46px;height:46px;border-radius:13px;font-size:23px;
  }
  :root:not([data-theme="dark"]) .import-grid .imp:nth-child(1) .ico{ background:rgba(242,89,31,.13); }
  :root:not([data-theme="dark"]) .import-grid .imp:nth-child(2) .ico{ background:rgba(47,128,196,.14); }
  :root:not([data-theme="dark"]) .import-grid .imp:nth-child(3) .ico{ background:rgba(30,160,70,.15); }
  :root:not([data-theme="dark"]) .import-grid .imp:nth-child(4) .ico{ background:rgba(224,149,31,.17); }

  /* punchier recipe tags + fridge pills */
  :root:not([data-theme="dark"]) .tag.veg{ background:rgba(30,160,70,.15); color:#137a3a; border-color:rgba(30,160,70,.42); }
  :root:not([data-theme="dark"]) .tag.meat{ background:rgba(214,64,40,.14); color:#b3341c; border-color:rgba(214,64,40,.4); }
}
:root[data-theme="light"] .cooknow-banner{
  background:linear-gradient(135deg,#e4f6e9,#fff1e8);
  border-color:rgba(30,160,70,.42);
}
:root[data-theme="light"] .cooknow-banner .cn-n{ color:#0f8a3a; }
:root[data-theme="light"] .imp .ico{
  display:inline-grid;place-items:center;width:46px;height:46px;border-radius:13px;font-size:23px;
}
:root[data-theme="light"] .import-grid .imp:nth-child(1) .ico{ background:rgba(242,89,31,.13); }
:root[data-theme="light"] .import-grid .imp:nth-child(2) .ico{ background:rgba(47,128,196,.14); }
:root[data-theme="light"] .import-grid .imp:nth-child(3) .ico{ background:rgba(30,160,70,.15); }
:root[data-theme="light"] .import-grid .imp:nth-child(4) .ico{ background:rgba(224,149,31,.17); }
:root[data-theme="light"] .tag.veg{ background:rgba(30,160,70,.15); color:#137a3a; border-color:rgba(30,160,70,.42); }
:root[data-theme="light"] .tag.meat{ background:rgba(214,64,40,.14); color:#b3341c; border-color:rgba(214,64,40,.4); }

/* ============================================================
   Mobile menu — animated hamburger + opaque dropdown + scrim.
   Applies site-wide (shared stylesheet); theme-independent.
   ============================================================ */
body{overflow-x:clip}                 /* stop sideways scroll without breaking sticky nav */

/* animated hamburger (three bars → X) */
.nav-burger{display:none;position:relative;width:44px;height:44px;flex:none;border:0;background:transparent;
  cursor:pointer;border-radius:12px;padding:0;-webkit-tap-highlight-color:transparent}
.nav-burger:hover{background:var(--surface,rgba(0,0,0,.05))}
.nav-burger span{position:absolute;left:12px;right:12px;height:2px;border-radius:2px;
  background:var(--text,#241a12);top:50%;margin-top:-1px;transition:transform .25s ease,opacity .18s ease}
.nav-burger span:nth-child(1){transform:translateY(-6px)}
.nav-burger span:nth-child(3){transform:translateY(6px)}
.nav-in.open .nav-burger span:nth-child(1){transform:rotate(45deg)}
.nav-in.open .nav-burger span:nth-child(2){opacity:0}
.nav-in.open .nav-burger span:nth-child(3){transform:rotate(-45deg)}

/* dimming scrim behind the open menu */
.nav-scrim{position:fixed;inset:0;z-index:44;background:rgba(20,14,8,.4);backdrop-filter:blur(2px);
  opacity:0;visibility:hidden;transition:opacity .25s ease,visibility .25s}
body.nav-open .nav-scrim{opacity:1;visibility:visible}

/* CRITICAL: lift the open menu's <nav> above the scrim on EVERY page.
   The nav uses backdrop-filter, which makes it its own stacking context; on pages
   where that nav has z-index:auto (or < the scrim's 44) the dropdown gets trapped
   BELOW the scrim — so the scrim dims the menu (faded text) AND swallows the tap on
   "Sign in", which is why sign-in failed on phones. Using position:sticky keeps an
   already-sticky nav behaving identically while also elevating a static one. */
body.nav-open nav{position:sticky;z-index:60}

@media(max-width:820px){
  .nav-burger{display:inline-flex}
  .nav-in{position:relative;gap:10px}

  .nav-in .nav-links{
    position:absolute;top:calc(100% + 12px);left:0;right:0;
    display:flex;flex-direction:column;align-items:stretch;gap:2px;
    background:var(--card,#fff);
    border:1px solid var(--line,rgba(0,0,0,.10));border-radius:18px;
    box-shadow:0 30px 70px -22px rgba(30,20,10,.5);
    padding:10px;z-index:60;max-height:80vh;overflow-y:auto;
    opacity:0;visibility:hidden;transform:translateY(-10px) scale(.985);transform-origin:top;
    transition:opacity .2s ease,transform .24s cubic-bezier(.2,.8,.2,1),visibility .2s;
    pointer-events:none;
  }
  .nav-in.open .nav-links{opacity:1;visibility:visible;transform:none;pointer-events:auto}

  /* text links: big tap targets + hover */
  .nav-in .nav-links > a{padding:13px 16px;border-radius:12px;font-size:16px;font-weight:500;
    color:var(--text,#241a12);display:flex;align-items:center;gap:10px}
  .nav-in .nav-links > a:not(.btn):hover,.nav-in .nav-links > a:not(.btn):active{background:var(--surface,rgba(0,0,0,.06))}

  /* "Get the app" CTA → full-width pill, separated */
  .nav-in .nav-links > a.btn,.nav-in .nav-links > a.btn-primary{
    margin-top:8px;justify-content:center;border-radius:999px !important;color:#fff !important;
    font-weight:600 !important;padding:14px 18px !important;font-size:15px !important}

  /* account / sign-in widget → full width */
  .nav-in .nav-links .acct{margin:8px 0 0 !important;width:100%;position:static}
  .nav-in .nav-links .acct-signin{display:flex;justify-content:center;width:100%;padding:14px 16px;
    border-radius:999px;border:0;font-weight:700;color:#fff;
    background:linear-gradient(135deg,var(--brand,#f2591f),#ff7a2f)}
  /* the "John ▾" chip → full-width row */
  .nav-in .nav-links .acct-btn{width:100%;justify-content:space-between;padding:12px 14px;
    border:1px solid var(--line,rgba(0,0,0,.1));border-radius:12px;background:var(--card-2,rgba(0,0,0,.02))}
  /* profile menu expands INLINE (accordion) instead of floating out misaligned */
  .nav-in .nav-links .acct-menu{position:static !important;width:100% !important;min-width:0 !important;
    transform:none !important;margin:6px 0 0 !important;box-shadow:none !important;
    border:1px solid var(--line,rgba(0,0,0,.1)) !important;border-radius:12px !important;
    left:auto !important;right:auto !important;top:auto !important}
}

/* ---- responsive safety: let flex inputs shrink, keep overlays in-bounds ---- */
.finder input{min-width:0}                 /* stops the "Surprise me" button spilling off-screen */
.finder{flex-wrap:nowrap}
img,svg,video,canvas{max-width:100%}
@media(max-width:760px){
  .url-sheet,.sheet,.share-sheet,.shop-sheet{max-width:100%}
  .finder{flex-wrap:wrap}
  .finder input{flex:1 1 100%;order:1}
  .finder .surprise{flex:1 1 100%;order:2;justify-content:center;padding:10px}
  .finder .fic{order:0}
}

/* feed trend cards: single column on small phones */
@media(max-width:520px){ .trend{grid-template-columns:1fr} }

/* ---- inner-page mobile polish (shared class patterns) ---- */
@media(max-width:600px){
  .page-head,.head{padding-top:24px}
  .p-top,.legend{flex-wrap:wrap}        /* pantry header + legend never crowd */
  .tabs{flex-wrap:wrap}                 /* messages/reviews tab rows wrap */
}
