/* AGRO SHOW 2026 Navigator — szata graficzna mobile (restyle wg agroshow-ds design system) */

/* Czcionki i ikony hostowane lokalnie w /static/fonts/ (CSP produkcji: style-src/font-src 'self',
   zewnetrzne CDN Google Fonts / jsdelivr byłyby zablokowane). */
@font-face{
  font-family:"Source Serif 4";
  font-style:normal;font-weight:600;font-display:swap;
  src:url("/static/fonts/source-serif-4-600-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:"Source Serif 4";
  font-style:normal;font-weight:600;font-display:swap;
  src:url("/static/fonts/source-serif-4-600-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:"Phosphor-Duotone";
  src:url("/static/fonts/Phosphor-Duotone.woff2") format("woff2");
  font-weight:normal;font-style:normal;font-display:block;
}
.ph-duotone{
  font-family:"Phosphor-Duotone"!important;speak:never;font-style:normal;font-weight:normal;
  font-variant:normal;text-transform:none;line-height:1;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
.ph-duotone.ph-storefront:before{content:"\e470";opacity:.2}.ph-duotone.ph-storefront:after{content:"\e471";margin-left:-1em}
.ph-duotone.ph-map-trifold:before{content:"\e31a";opacity:.2}.ph-duotone.ph-map-trifold:after{content:"\e31b";margin-left:-1em}
.ph-duotone.ph-target:before{content:"\e47c";opacity:.2}.ph-duotone.ph-target:after{content:"\e47d";margin-left:-1em}
.ph-duotone.ph-path:before{content:"\e39c";opacity:.2}.ph-duotone.ph-path:after{content:"\e39d";margin-left:-1em}
.ph-duotone.ph-gear-six:before{content:"\e272";opacity:.2}.ph-duotone.ph-gear-six:after{content:"\e273";margin-left:-1em}
.ph-duotone.ph-navigation-arrow:before{content:"\eade";opacity:.2}.ph-duotone.ph-navigation-arrow:after{content:"\eadf";margin-left:-1em}
.ph-duotone.ph-magic-wand:before{content:"\e6b6";opacity:.2}.ph-duotone.ph-magic-wand:after{content:"\e6b7";margin-left:-1em}
.ph-duotone.ph-lock-key-open:before{content:"\e300";opacity:.2}.ph-duotone.ph-lock-key-open:after{content:"\e301";margin-left:-1em}

:root{
  --bg:#f3f2f2;
  --surface:#eae9e9;
  --panel:#ffffff;
  --text:#201e1d;
  --muted:#605d5d;
  --line:color-mix(in srgb, #201e1d 16%, transparent);
  --green:#178a4c;
  --green-600:#17864a;
  --green-700:#056838;
  --green-800:#054a29;
  --green-100:#e8f8ec;
  --green-200:#c9efd3;
  --amber:#c9600a;
  --amber-100:#fff3e8;
  --amber-800:#743607;
  --danger:#b42318;
  --radius:2px;
  --radius-lg:4px;
  --shadow-sm:0 1px 2px rgba(32,30,29,.14);
  --shadow-md:0 3px 10px rgba(32,30,29,.16);
  --shadow-lg:0 12px 32px rgba(32,30,29,.22);
  --font-heading:"Source Serif 4",system-ui,-apple-system,"Segoe UI",serif;
  --font-body:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --tabbar-h:64px;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;font-family:var(--font-body);font-size:15px;color:var(--text);background:var(--bg)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
h1,h2{font-family:var(--font-heading);font-weight:600;letter-spacing:-.015em}

/* — icon sizing (Phosphor Duotone webfont, loaded in <head>; buttons keep their text, icons are a purely decorative enhancement) — */
.icon{font-size:22px;line-height:1;display:inline-block;vertical-align:-4px}

/* — top bar — */
.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:var(--bg);border-bottom:1px solid var(--line)}
.brand{font-family:var(--font-heading);font-size:20px;font-weight:600;letter-spacing:-.02em}
.source-note{font-size:12px;color:var(--muted);margin-top:3px}

/* — section nav: top pill row on wide screens, fixed bottom tab bar on mobile (default) — */
.nav{position:sticky;top:57px;z-index:29;display:flex;gap:7px;overflow:auto;padding:10px 18px;background:var(--bg);border-bottom:1px solid var(--line)}
.nav-button{white-space:nowrap;border:1px solid var(--line);background:var(--panel);padding:9px 13px;border-radius:var(--radius);color:var(--text);font-weight:500;display:inline-flex;align-items:center;gap:7px}
.nav-button .icon{font-size:18px}
.nav-button.active{background:var(--green);border-color:var(--green);color:#fff;font-weight:600}

main{max-width:1400px;margin:0 auto;padding:20px 18px calc(var(--tabbar-h) + 28px)}
.view{display:none}.view.active{display:block}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow-sm)}
h1{margin:0 0 8px;font-size:26px}
h2{font-size:18px;margin:22px 0 10px}
p{line-height:1.55}
h1+p,.hero-row p{margin-top:0;color:var(--muted)}
.hero-row{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}

/* — buttons — */
.button{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--green);background:var(--green);color:#fff;padding:10px 15px;min-height:44px;border-radius:var(--radius);font-weight:600;font-family:var(--font-body)}
.button:hover{background:var(--green-600);border-color:var(--green-600)}
.button:active{background:var(--green-700);border-color:var(--green-700)}
.button.light{background:var(--panel);color:var(--green);border-color:var(--line)}
.button.light:hover{background:var(--surface)}

/* — filters / form controls — */
.filters,.route-controls{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin:18px 0}
label{font-size:12px;color:var(--muted);display:flex;flex-direction:column;gap:5px}
label.grow,.grow{flex:1;min-width:240px}
input,select,textarea{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--text);padding:10px 12px;min-height:44px;outline:none}
textarea{min-height:64px}
input:focus,select:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px var(--green-100)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:.85}
.filters input{min-width:260px}
.result-meta{font-size:13px;color:var(--muted);margin:2px 0 12px}

/* — exhibitor cards — */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px}
.card{border:1px solid var(--line);border-radius:var(--radius);padding:15px;background:var(--surface);display:flex;flex-direction:column;min-height:190px}
.card h3{font-family:var(--font-heading);font-size:17px;font-weight:600;line-height:1.25;margin:0 0 8px}
.location{font-weight:600;font-size:13px}
.category{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--green-700);margin-top:6px;font-weight:600}
.card p{font-size:13px;color:var(--muted);margin:8px 0 0}
.card-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
.tag{background:var(--green-100);border-radius:calc(var(--radius) * .75);padding:4px 8px;font-size:11px;color:var(--green-800)}
.card-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:auto;padding-top:14px}
.card-actions .button{padding:8px 11px;font-size:12px;min-height:38px}
.card-actions .button.light{color:var(--green-700)}

/* — map — */
.map-shell{position:relative;width:100%;border:1px solid var(--line);border-radius:var(--radius-lg);overflow:auto;background:var(--green-100);min-height:320px;box-shadow:var(--shadow-sm)}
.map-shell img{display:block;width:100%;min-width:900px;height:auto}
.map-shell svg{position:absolute;inset:0;width:100%;height:100%;min-width:900px;pointer-events:none}
.route-path{fill:none;stroke:var(--text);stroke-width:14;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:.9}
.route-shadow{fill:none;stroke:#fff;stroke-width:25;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:.75}
.target-marker{fill:#fff;stroke:var(--text);stroke-width:9}
.start-marker{fill:var(--green);stroke:#fff;stroke-width:9}
.recommend-marker{fill:#fff;stroke:var(--amber-800);stroke-width:8}
.route-summary{background:var(--green-100);color:var(--green-800);padding:12px 14px;border-radius:var(--radius);margin-bottom:12px;font-weight:600}
.route-instructions{margin-top:12px;border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;background:var(--panel)}
.route-instructions ol{margin:0;padding-left:22px}.route-instructions li{margin:5px 0}
.notice{margin-top:12px;padding:12px 14px;border-left:3px solid var(--green);background:var(--surface);font-size:13px;color:var(--muted);border-radius:0 var(--radius) var(--radius) 0}

/* — survey / match form — */
.survey{display:flex;flex-direction:column;gap:14px}
fieldset{border:1px solid var(--line);border-radius:var(--radius-lg);padding:14px}
legend{font-family:var(--font-heading);font-weight:600;padding:0 6px;font-size:14px}
.choice-row{display:flex;gap:16px;flex-wrap:wrap}
.choice-row label,.checkbox-grid label,.consent{display:flex;flex-direction:row;align-items:flex-start;gap:8px;color:var(--text);font-size:14px}
.choice-row input,.checkbox-grid input,.consent input{margin-top:3px;min-height:auto}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.form-grid .wide{grid-column:1/-1}
.checkbox-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px}

/* — recommendations — */
.recommendations{margin-top:22px}
.recommendation{display:grid;grid-template-columns:52px 1fr auto;gap:12px;align-items:center;border:1px solid var(--line);border-radius:var(--radius);padding:12px;margin:8px 0;background:var(--surface)}
.score{width:48px;height:48px;border-radius:var(--radius);background:var(--green);color:#fff;display:grid;place-items:center;font-size:16px;font-weight:700}
.reason{font-size:12px;color:var(--muted);margin-top:4px}

/* — metrics / lists / tables — */
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}
.metric{border:1px solid var(--line);border-radius:var(--radius);padding:14px;background:var(--surface)}
.metric strong{display:block;font-family:var(--font-heading);font-size:26px}
.metric span{font-size:12px;color:var(--muted)}
.metric.compact{min-width:120px}.metric.compact strong{font-size:22px}
.simple-list{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--panel)}
.list-row{padding:11px 13px;border-bottom:1px solid var(--line);font-size:13px}.list-row:last-child{border-bottom:0}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:var(--radius)}
table{border-collapse:collapse;width:100%;min-width:950px}
th,td{padding:10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;font-size:12px}
th{background:var(--surface);color:var(--muted);font-weight:600;letter-spacing:.03em;text-transform:uppercase;font-size:11px}
.hidden{display:none!important}

/* — modal / toast — */
.modal{position:fixed;inset:0;z-index:80;background:rgba(32,30,29,.5);display:grid;place-items:center;padding:20px}
.modal-card{background:var(--panel);max-width:560px;border-radius:var(--radius-lg);padding:22px;box-shadow:var(--shadow-lg)}
.modal-card h2{margin-top:0;font-size:20px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.toast{position:fixed;left:16px;right:16px;bottom:calc(var(--tabbar-h) + 14px);z-index:100;background:var(--text);color:var(--bg);padding:12px 15px;border-radius:var(--radius);max-width:420px;margin:0 auto;box-shadow:var(--shadow-lg);font-size:14px}

/* ══════════════ mobile-first tab bar (default: ≤850px, iPhone 402×874 primary target) ══════════════ */
@media(max-width:850px){
  .topbar{padding:calc(env(safe-area-inset-top,0px) + 10px) 16px 10px}
  main{padding:14px 14px calc(var(--tabbar-h) + env(safe-area-inset-bottom,0px) + 20px)}
  .panel{padding:16px;border-radius:var(--radius)}
  .hero-row{flex-direction:column}
  .filters,.route-controls{align-items:stretch}
  .filters label,.route-controls label{width:100%}
  .filters input{min-width:0;width:100%}
  .form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}
  .metrics{grid-template-columns:repeat(2,1fr)}
  .recommendation{grid-template-columns:44px 1fr}.recommendation .card-actions{grid-column:1/-1}

  /* nav becomes a fixed bottom tab bar */
  .nav{
    position:fixed;top:auto;left:0;right:0;bottom:0;z-index:40;
    display:flex;gap:0;overflow:visible;background:var(--surface);
    border-bottom:0;border-top:1px solid var(--line);
    padding:6px 4px calc(env(safe-area-inset-bottom,0px) + 6px);
    box-shadow:0 -3px 10px rgba(32,30,29,.1);
  }
  .nav-button{
    flex:1;min-height:52px;border:0;background:transparent;color:var(--muted);
    flex-direction:column;justify-content:center;gap:3px;padding:4px;border-radius:var(--radius);
    font-size:11px;font-weight:500;
  }
  .nav-button .icon{font-size:24px}
  .nav-button.active{background:transparent;color:var(--green);border-color:transparent;font-weight:600}
}
@media(max-width:520px){
  .brand{font-size:18px}.source-note{font-size:10px}
  .topbar .button{padding:8px 11px;font-size:12px}
  h1{font-size:22px}
  .cards{grid-template-columns:1fr}
  .metrics{grid-template-columns:1fr 1fr}
}

/* wide screens keep the classic top pill nav, unchanged from before */
@media(min-width:851px){
  .nav-button{flex-direction:row}
}
