/* ==========================================================================
   Súhlas s cookies — Projekčný ateliér KockanDesign
   Farby a typografia nadväzujú na styly/style.css (#E20000 / #222 / #f6f6f6,
   font Ubuntu) a na preload/preloader.css (tmavé plochy, 0.35s prechody).
   ========================================================================== */

html.cookie-modal-open,
html.cookie-modal-open body {
    overflow: hidden !important;
}

#cookie-banner,
#cookie-modal,
#cookie-reopen {
    font-family: 'Ubuntu', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #f6f6f6;
    box-sizing: border-box;
}
#cookie-banner *,
#cookie-modal *,
#cookie-reopen * { box-sizing: border-box; }

/* ---------------------------------------------------------------- Banner */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99997;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px clamp(16px, 4vw, 48px);
    background: #111;
    border-top: 1px solid rgba(226,0,0,.35);
    box-shadow: 0 -8px 30px rgba(0,0,0,.45);
    transform: translateY(105%);
    transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.cookie-banner.is-visible { transform: translateY(0); }

.cookie-banner-text { flex: 1 1 420px; min-width: 240px; }
.cookie-banner-title {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .5px;
    margin: 0 0 6px 0;
    text-transform: uppercase;
}
.cookie-banner-title::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    margin: 0 8px 2px 0;
    background: #E20000;
    border-radius: 50%;
}
.cookie-banner-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(245,245,245,.75);
    max-width: 620px;
}
.cookie-link { color: #f6f6f6; text-decoration: underline; text-underline-offset: 2px; }
.cookie-link:hover { color: #E20000; }

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 0 0 auto;
}

/* ----------------------------------------------------------------- Buttons */
.cookie-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 12px 20px;
    border-radius: 2px;
    transition: all 0.35s ease-in-out;
    white-space: nowrap;
}
.cookie-btn-primary { background: #E20000; color: #fff; }
.cookie-btn-primary:hover { background: #ff2222; }
.cookie-btn-outline { background: transparent; color: #f6f6f6; border: 1px solid rgba(245,245,245,.35); }
.cookie-btn-outline:hover { border-color: #E20000; color: #E20000; }
.cookie-btn-ghost { background: transparent; color: rgba(245,245,245,.6); border: 1px solid transparent; }
.cookie-btn-ghost:hover { color: #f6f6f6; text-decoration: underline; }

/* ------------------------------------------------------------------ Modal */
.cookie-modal { position: fixed; inset: 0; z-index: 99998; display: flex; align-items: center; justify-content: center; padding: 24px; }
.cookie-modal-backdrop { position: absolute; inset: 0; background: rgba(5,5,5,.72); opacity: 0; transition: opacity 0.35s ease; }
.cookie-modal.is-visible .cookie-modal-backdrop { opacity: 1; }

.cookie-modal-box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    background: #111;
    border: 1px solid rgba(226,0,0,.3);
    padding: 34px 30px 26px 30px;
    opacity: 0;
    transform: translateY(16px) scale(.98);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.cookie-modal.is-visible .cookie-modal-box { opacity: 1; transform: translateY(0) scale(1); }

.cookie-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border: none;
    background: transparent;
    color: rgba(245,245,245,.6);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.35s ease;
}
.cookie-modal-close:hover { color: #E20000; }

.cookie-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
}
.cookie-modal-intro {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(245,245,245,.7);
    margin: 0 0 24px 0;
}

.cookie-category { padding: 16px 0; border-top: 1px solid rgba(245,245,245,.12); }
.cookie-category:last-of-type { border-bottom: 1px solid rgba(245,245,245,.12); }
.cookie-category-head { display: flex; align-items: center; gap: 12px; }
.cookie-category-name { font-weight: 500; font-size: 15px; flex: 1 1 auto; }
.cookie-category-state { font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: rgba(245,245,245,.4); }
.cookie-category-desc {
    margin: 8px 0 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(245,245,245,.6);
}
.cookie-category-desc a { color: rgba(245,245,245,.8); }
.cookie-category-desc a:hover { color: #E20000; }

/* Toggle switch */
.cookie-toggle {
    position: relative;
    flex: 0 0 auto;
    width: 42px; height: 24px;
    padding: 0;
    border: 1px solid rgba(245,245,245,.3);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.35s ease, background 0.35s ease;
}
.cookie-toggle-dot {
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(245,245,245,.5);
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), background 0.35s ease;
}
.cookie-toggle[aria-checked="true"] { background: rgba(226,0,0,.25); border-color: #E20000; }
.cookie-toggle[aria-checked="true"] .cookie-toggle-dot { transform: translateX(18px); background: #E20000; }
.cookie-toggle-locked { opacity: .55; cursor: default; border-color: rgba(245,245,245,.2); }
.cookie-toggle-locked .cookie-toggle-dot { background: rgba(245,245,245,.6); transform: translateX(18px); }

.cookie-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 26px;
}

/* ------------------------------------------------------------- Reopen fab */
.cookie-reopen {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 99996;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #222;
    color: #f6f6f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    opacity: 0;
    transform: scale(.7);
    pointer-events: none;
    transition: all 0.35s ease-in-out;
}
.cookie-reopen.is-visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.cookie-reopen:hover { background: #E20000; }
.cookie-reopen svg { width: 22px; height: 22px; }

[hidden] { display: none !important; }

.cookie-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

@media screen and (max-width: 640px) {
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 18px 16px; }
    .cookie-banner-actions { width: 100%; }
    .cookie-banner-actions .cookie-btn { flex: 1 1 auto; }
    .cookie-modal-box { padding: 26px 18px 20px 18px; }
    .cookie-reopen { left: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner, .cookie-modal-backdrop, .cookie-modal-box, .cookie-reopen, .cookie-toggle, .cookie-toggle-dot {
        transition-duration: .15s;
    }
}
