/* Cookie banner, preference panel and cookie-policy tables (task 15).
   Uses the theme tokens from style.css (--red, --radius, --shadow) — no new palette. */

/* ---- banner ---------------------------------------------------------- */

.cookie-banner{position:fixed;left:0;right:0;bottom:0;z-index:900;background:#fff;
  border-top:3px solid var(--red);box-shadow:0 -12px 38px rgba(0,0,0,.16);padding:18px 0}
.cookie-banner[hidden]{display:none}
.cookie-banner-inner{width:min(1420px,calc(100% - 56px));margin:auto;display:grid;
  grid-template-columns:1fr auto;gap:24px;align-items:center}
.cookie-banner-text h2{margin:0 0 6px;font-size:16px;text-transform:uppercase;letter-spacing:.3px}
.cookie-banner-text p{margin:0;font-size:14px;line-height:1.6;color:#333;max-width:900px}
.cookie-banner-text a{color:var(--red);text-decoration:underline}
.cookie-banner-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}

/* Accept and Reject are the same size on purpose — declining must not be the harder path. */
.cookie-banner-actions .btn,.cookie-panel-actions .btn{font-size:12px;padding:13px 22px;min-height:44px}
.btn-ghost{background:#fff;color:var(--red);border:1px solid var(--red);box-shadow:none}
.btn-ghost:hover{background:#fff5f5;box-shadow:none}
.cookie-link{background:none;border:0;color:#444;font:inherit;font-size:13px;font-weight:800;
  text-decoration:underline;cursor:pointer;padding:12px 6px;min-height:44px}
.cookie-link:hover{color:var(--red)}

/* ---- preference panel ------------------------------------------------ */

.cookie-panel{position:fixed;inset:0;z-index:950;background:rgba(0,0,0,.55);
  display:flex;align-items:center;justify-content:center;padding:24px;
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.cookie-panel[hidden]{display:none}
body.cookie-panel-open{overflow:hidden}
.cookie-panel-box{background:#fff;border-radius:var(--radius,18px);box-shadow:0 24px 60px rgba(0,0,0,.3);
  width:min(620px,100%);max-height:min(86vh,760px);display:flex;flex-direction:column;overflow:hidden}
.cookie-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:22px 26px 14px;border-bottom:1px solid #ececea}
.cookie-panel-head h2{margin:0;font-size:19px;text-transform:uppercase;letter-spacing:.3px}
.cookie-close{background:none;border:0;font-size:28px;line-height:1;cursor:pointer;color:#666;
  min-width:44px;min-height:44px}
.cookie-close:hover{color:var(--red)}
.cookie-panel-body{padding:18px 26px;overflow-y:auto}
.cookie-panel-lead,.cookie-panel-more{font-size:14px;line-height:1.6;color:#444}
.cookie-panel-more a,.cookie-panel-lead a{color:var(--red);text-decoration:underline}

.cookie-cat{border:1px solid #e6e6e2;border-radius:14px;padding:16px 18px;margin:14px 0;background:#fcfcfb}
.cookie-cat-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cookie-cat-name{font-weight:900;font-size:14px;text-transform:uppercase;letter-spacing:.3px}
.cookie-cat-desc{margin:8px 0 0;font-size:13.5px;line-height:1.6;color:#444}
.cookie-always{font-size:11px;font-weight:900;text-transform:uppercase;color:#0a7a3f;
  background:#e8f6ee;border-radius:999px;padding:5px 10px;white-space:nowrap}

/* Switch: a real checkbox, visually a toggle. Keyboard and screen readers get the input. */
.cookie-switch{display:flex;align-items:center;gap:12px;cursor:pointer;min-height:44px}
.cookie-switch.is-locked{cursor:default}
.cookie-switch input{position:absolute;opacity:0;width:0;height:0}
.cookie-switch-track{position:relative;flex:0 0 auto;width:46px;height:26px;border-radius:999px;
  background:#cfcfc9;transition:background .18s ease}
.cookie-switch-track:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;
  border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .18s ease}
.cookie-switch input:checked+.cookie-switch-track{background:var(--red)}
.cookie-switch input:checked+.cookie-switch-track:after{transform:translateX(20px)}
.cookie-switch.is-locked input:checked+.cookie-switch-track{background:#9aa39c}
.cookie-switch input:focus-visible+.cookie-switch-track{outline:3px solid rgba(201,8,11,.35);outline-offset:2px}

.cookie-panel-actions{display:flex;gap:10px;flex-wrap:wrap;padding:16px 26px 22px;
  border-top:1px solid #ececea;background:#fafaf8}

/* ---- footer entry point ---------------------------------------------- */

.authorization .cookie-link{color:#ccc;font-size:12px;font-weight:400;padding:0 2px;min-height:0}
.authorization .cookie-link:hover{color:#fff}

/* ---- cookie policy page tables --------------------------------------- */

.short-copy table{width:100%;border-collapse:collapse;margin:22px 0;font-size:14px;
  background:#fff;border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}
.short-copy th,.short-copy td{text-align:left;padding:12px 14px;border-bottom:1px solid #ededea;
  vertical-align:top;line-height:1.55}
.short-copy th{background:#f4f4f1;font-size:12px;text-transform:uppercase;letter-spacing:.4px}
.short-copy tr:last-child td{border-bottom:0}
.short-copy td code{background:#f5f5f2;border-radius:6px;padding:2px 6px;font-size:13px}

@media(max-width:780px){
  /* 2026-09-17 (client: "na mobile menší"): 314px -> ~200px of the screen. Tighter type, the two
     buttons side by side (still 44px tall, still the same size as each other), the preferences
     link small under them. Copy unchanged. */
  .cookie-banner{padding:10px 0 10px}
  .cookie-banner-inner{width:min(1420px,calc(100% - 28px));grid-template-columns:1fr;gap:10px}
  .cookie-banner-text h2{font-size:13px;margin-bottom:4px}
  .cookie-banner-text p{font-size:12.5px;line-height:1.45}
  .cookie-banner-actions{justify-content:stretch;gap:8px}
  .cookie-banner-actions .btn{flex:1 1 calc(50% - 4px);padding:10px 6px;font-size:11px;letter-spacing:.2px;white-space:nowrap}
  .cookie-link{width:100%;text-align:center;font-size:12px;padding:0}
  .cookie-panel{padding:0;align-items:flex-end}
  .cookie-panel-box{max-height:92vh;border-radius:22px 22px 0 0;width:100%}
  .cookie-panel-head{padding:18px 18px 12px}
  .cookie-panel-body{padding:14px 18px}
  .cookie-panel-actions{padding:14px 18px 20px}
  .cookie-panel-actions .btn{flex:1 1 100%}
  /* A wide inventory table must scroll inside itself, never the page. */
  .short-copy table{display:block;overflow-x:auto;white-space:normal}
}

@media(prefers-reduced-motion:reduce){
  .cookie-switch-track,.cookie-switch-track:after{transition:none}
}
