/* ============================================================
   cookies.css — the cookie consent dialog

   Palette and shapes follow the rest of the site:
     ink #172124 · mint #dbfaf2 · gold #bd8c00 · square corners

   The variables are the same ones cart.css defines on :root. They
   are repeated on .lck-root so the dialog still looks right on a
   page that loads this file without cart.css.

   Needs cookies.js.
   ============================================================ */

.lck-root {
    --lck-ink:   #172124;
    --lck-mint:  #dbfaf2;
    --lck-gold:  #bd8c00;
    --lck-line:  #e6e6e0;
    --lck-muted: #6b7679;
    --lck-bg:    #ffffff;
    --lck-font:  'Barlow Condensed', sans-serif;
}

/* Above everything else on the site. The highest z-index anywhere
   else is the 9999 on the category-page lightbox. */
.lck-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(23, 33, 36, 0.62);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lck-backdrop.is-open { opacity: 1; }
.lck-backdrop[hidden]  { display: none; }

/* While the dialog is up the page behind it must not scroll. */
.lck-locked { overflow: hidden; }

.lck-modal {
    width: min(620px, 100%);
    max-height: min(88vh, 760px);
    display: flex;
    flex-direction: column;
    background: var(--lck-bg);
    color: var(--lck-ink);
    font-family: var(--lck-font);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
    transform: translateY(18px) scale(0.98);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.lck-backdrop.is-open .lck-modal { transform: none; }

@media (prefers-reduced-motion: reduce) {
    .lck-backdrop,
    .lck-modal { transition: none; }
}

/* ------------------------------------------------------------
   HEAD
   ------------------------------------------------------------ */

.lck-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: var(--lck-ink);
    color: #fff;
    flex: none;
}

.lck-head svg {
    width: 26px;
    height: 26px;
    flex: none;
    color: var(--lck-mint);
}

.lck-head h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ------------------------------------------------------------
   BODY
   ------------------------------------------------------------ */

.lck-body {
    padding: 22px 24px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.lck-text {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.45;
    color: var(--lck-ink);
}

.lck-text + .lck-text { margin-top: 10px; }

.lck-text a {
    color: var(--lck-ink);
    text-underline-offset: 2px;
}

.lck-text a:hover { color: var(--lck-gold); }

/* ------------------------------------------------------------
   THE CATEGORY LIST (second screen)
   ------------------------------------------------------------ */

.lck-cats {
    margin: 18px 0 0;
    border-top: 1px solid var(--lck-line);
}

.lck-cats[hidden] { display: none; }

.lck-cat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px 2px;
    border-bottom: 1px solid var(--lck-line);
}

.lck-cat__copy { flex: 1 1 auto; }

.lck-cat__name {
    display: block;
    margin: 0 0 3px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lck-cat__always {
    margin-left: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--lck-gold);
}

.lck-cat__desc {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--lck-muted);
}

/* The switch. A real checkbox, moved out of sight but still focusable,
   with the visible part drawn by the <span> next to it. */
.lck-switch {
    position: relative;
    flex: none;
    width: 52px;
    height: 28px;
    margin-top: 2px;
}

.lck-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.lck-switch__track {
    position: absolute;
    inset: 0;
    background: #c9cfd0;
    transition: background 0.18s ease;
    pointer-events: none;
}

.lck-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s ease;
}

.lck-switch input:checked ~ .lck-switch__track            { background: var(--lck-ink); }
.lck-switch input:checked ~ .lck-switch__track::after      { transform: translateX(24px); }
.lck-switch input:focus-visible ~ .lck-switch__track       { outline: 2px solid var(--lck-gold); outline-offset: 2px; }

/* "Nevyhnutné" cannot be switched off. It has to still read as ON — a
   greyed-out switch that looks off would say the opposite of the truth —
   so keep it dark and only soften it. */
.lck-switch input:disabled { cursor: not-allowed; }

.lck-switch input:disabled ~ .lck-switch__track {
    background: var(--lck-muted);
}

.lck-switch input:disabled ~ .lck-switch__track::after {
    background: #f2f2ee;
    box-shadow: none;
}

/* ------------------------------------------------------------
   FOOT / BUTTONS
   ------------------------------------------------------------ */

.lck-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--lck-line);
    flex: none;
}

.lck-btn {
    flex: 1 1 170px;
    padding: 13px 18px;
    border: 2px solid var(--lck-ink);
    background: #fff;
    color: var(--lck-ink);
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lck-btn:hover { background: var(--lck-ink); color: #fff; }

.lck-btn:focus-visible {
    outline: 2px solid var(--lck-gold);
    outline-offset: 2px;
}

/* the one we want people to press */
.lck-btn--primary {
    background: var(--lck-mint);
    border-color: var(--lck-mint);
}

.lck-btn--primary:hover {
    background: #c4f0e4;
    border-color: #c4f0e4;
    color: var(--lck-ink);
}

/* "Uložiť voľbu" only appears with the categories folded out, and it gets
   a row of its own. Three buttons abreast wrap their labels onto two
   lines at this font size — and squeezing "Odmietnuť všetko" is exactly
   the nudge this dialog must not make. */
.lck-btn--wide { flex: 1 1 100%; }

/* "Nastavenia" / "Skryť nastavenia" — quieter than the real choices, but
   still a full-size target, not a hidden link. */
.lck-btn--ghost {
    flex: 1 1 100%;
    border-color: var(--lck-line);
    color: var(--lck-muted);
    font-size: 1.05rem;
}

.lck-btn--ghost:hover {
    background: #f4f4f1;
    border-color: var(--lck-muted);
    color: var(--lck-ink);
}

/* ------------------------------------------------------------
   THE FOOTER LINK that re-opens the dialog
   ------------------------------------------------------------ */

.lck-reopen {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lck-reopen:hover { color: var(--lck-gold, #bd8c00); }

/* A footer of last resort, for a page that has none of its own
   (objednavka.html). Only ever holds the re-open link. */
.lck-footbar {
    padding: 26px 20px 30px;
    border-top: 1px solid var(--lck-line);
    background: #fafaf8;
    color: var(--lck-muted);
    font-family: var(--lck-font);
    font-size: 1rem;
    text-align: center;
}

/* ------------------------------------------------------------
   SMALL SCREENS
   ------------------------------------------------------------ */

@media (max-width: 560px) {
    .lck-backdrop {
        padding: 0;
        align-items: flex-end;
    }

    .lck-modal {
        width: 100%;
        max-height: 92vh;
    }

    .lck-head  { padding: 15px 18px; }
    .lck-body  { padding: 18px; }
    .lck-foot  { padding: 14px 18px 18px; }

    .lck-head h2 { font-size: 1.3rem; }
    .lck-btn     { flex: 1 1 100%; }
}
