/* =========================
   COOKIE BAR – BOTTOM STRIP
   ========================= */
.cookie-banner.cookiebar--inline {
    position: fixed; left: 0; right: 0; bottom: 0; width: 100%;
    z-index: 99998;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 -6px 24px rgba(0,0,0,.08);
    padding: 18px 24px;
}
.cookiebar__inner { display: flex; gap: 20px; align-items: flex-start; }
.cookiebar__left { display: grid; grid-template-columns: 48px 1fr; gap: 14px; flex: 1; }
.cookiebar__icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; font-size: 22px; }

.cookiebar__title { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: #111827; }
.cookiebar__text  { margin: 0 0 10px; font-size: 14px; color: #374151; }
.cookiebar__text a { color: #2563eb; text-decoration: none; }
.cookiebar__text a:hover { text-decoration: underline; }
.cookiebar__text a[onclick*="toggleDetails"] { font-weight: 600; }

.cookiebar__toggles { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.cookiebar__toggle  { display: flex; align-items: center; gap: 10px; font-size: 17px; color: #1f2937; }
.cookiebar__toggle--locked { opacity: .8; }

/* RIGHT BUTTONS */
.cookiebar__right { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 260px; flex-shrink: 0; }
.btn { padding: 14px 18px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; border: 1px solid transparent; text-align: center; }
.btn--primary { background: #1d4ed8; color: #fff; }
.btn--ghost   { background: #f3f4f6; color: #111827; border-color: #e5e7eb; }
.btn:hover { filter: brightness(.97); }

@media (max-width: 900px) {
    .cookiebar__inner { flex-direction: column; }
    .cookiebar__right { width: 100%; }
}

/* ==============
   EXPANDED MODE
   ============== */
.cookie-banner.cookiebar--inline.cookiebar--expanded {
    top: 5%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, 92vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 12px;
    padding: 24px;
}
.cookiebar--expanded .cookiebar__inner { align-items: flex-start; }
.cookiebar--expanded .cookiebar__right { position: sticky; top: 12px; }

/* ===================
   CATEGORIES + LISTS
   =================== */
.cookie-details { margin-top: 12px; display: grid; gap: 10px; }

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}
.cookie-category__header {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    background: transparent; border: 0;
    cursor: pointer; font-size: 15px; color: #111827;
}
.cookie-category__meta { display: flex; align-items: center; gap: 12px; }

.cookie-category__providers {
    display: none;
    padding: 8px 14px 14px 14px;
    border-top: 1px dashed #e5e7eb;
}
.cookie-category.open .cookie-category__providers { display: block; }

.cookie-provider { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.cookie-provider a.service-link { text-decoration: underline; }

/* ======================
   BASE TOGGLE (inputs v horním přehledu)
   ====================== */
.toggle-switch { position: relative; width: 42px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .slider {
    position: absolute; inset: 0; cursor: pointer;
    background-color: #cbd5e0; border-radius: 34px; transition: .25s;
}
.toggle-switch .slider:before {
    content: ""; position: absolute; height: 16px; width: 16px; left: 4px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: .25s;
}
.toggle-switch input:checked + .slider { background: #10b981; }
.toggle-switch input:checked + .slider:before { transform: translateX(18px); }

/* ======================
   PROXY TOGGLE (v hlavičkách kategorií – bez inputu)
   ====================== */
.cookie-category__header .toggle-switch { width: 44px; height: 24px; }
.cookie-category__header .toggle-switch .slider {
    position: absolute; inset: 0;
    background: #e5e7eb; border: 1px solid #d1d5db;
    border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.02);
    transition: background .25s, border-color .25s;
}
.cookie-category__header .toggle-switch .proxy-knob {
    position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 999px;
    background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15);
    transition: transform .25s;
}
/* ON stav nastavuje JS třídou .is-on */
.cookie-category__header .toggle-switch.is-on .slider { background: #10b981; border-color: #10b981; }
.cookie-category__header .toggle-switch.is-on .proxy-knob { transform: translateX(20px); }
.cookie-category__header .toggle-switch:hover .slider { box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }

/* ======
   MODAL
   ====== */
#service-info-modal {
    display: none; position: fixed; top: 10%; left: 50%; transform: translateX(-50%);
    background: #fff; padding: 30px; border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,.2); z-index: 99998;
    width: 95%; max-width: 700px; opacity: 0; animation: fadeIn .3s ease forwards;
}
#service-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 9999; animation: fadeIn .3s ease forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* 1) Základní toggle = jen horní přehled (čte stav z <input>) */
.cookiebar__toggles .toggle-switch { position: relative; width: 42px; height: 22px; }
.cookiebar__toggles .toggle-switch input { opacity: 0; width: 0; height: 0; }
.cookiebar__toggles .toggle-switch .slider {
    position: absolute; inset: 0; cursor: pointer;
    background: #cbd5e0; border-radius: 34px; transition: .25s;
}
.cookiebar__toggles .toggle-switch .slider:before {
    content: ""; position: absolute; height: 16px; width: 16px; left: 4px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: .25s;
}
.cookiebar__toggles .toggle-switch input:checked + .slider { background: #10b981; }
.cookiebar__toggles .toggle-switch input:checked + .slider:before { transform: translateX(18px); }

/* 2) Proxy toggle = v hlavičce kategorie (bez <input>) */
.cookie-category__header .toggle-switch { position: relative; width: 44px; height: 24px; }
.cookie-category__header .toggle-switch .slider {
    position: absolute; inset: 0;
    background: #e5e7eb; border: 1px solid #d1d5db;
    border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.02);
    transition: background .25s, border-color .25s;
}
/* DŮLEŽITÉ: zrušit pseudo-element ze základního stylu */
.cookie-category__header .toggle-switch .slider:before { content: none; }

.cookie-category__header .toggle-switch .proxy-knob{
    position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 999px;
    background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15);
    transition: transform .25s;
}
/* ON stav – nastavuje JS třídou .is-on */
.cookie-category__header .toggle-switch.is-on .slider { background: #10b981; border-color: #10b981; }
.cookie-category__header .toggle-switch.is-on .proxy-knob { transform: translateX(20px); }

/* Volitelně: hover/focus */
.cookie-category__header .toggle-switch:hover .slider { box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }

/*make it bigger*/
/* Zvýraznění názvu kategorie */
.cookie-category__header {
    font-size: 17px;       /* větší text */
    font-weight: 600;      /* tučnější */
    padding: 16px 18px;    /* trochu víc prostoru kolem */
}

/* Zvětšený toggle pro horní řadu (inputs) */
.cookiebar__toggles .toggle-switch {
    width: 52px;
    height: 28px;
}
.cookiebar__toggles .toggle-switch .slider:before {
    height: 20px;
    width: 20px;
    bottom: 4px;
}
.cookiebar__toggles .toggle-switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* Zvětšený proxy toggle pro kategorie */
.cookie-category__header .toggle-switch {
    width: 52px;
    height: 28px;
}
.cookie-category__header .toggle-switch .proxy-knob {
    width: 20px;
    height: 20px;
    top: 4px;
    left: 4px;
}
.cookie-category__header .toggle-switch.is-on .proxy-knob {
    transform: translateX(24px);
}

/* ===== Mobile – vyšší panel, všechna tlačítka viditelná ===== */
@media (max-width: 640px) {
    .cookie-banner.cookiebar--inline {
        margin: 0;
        left: 0; right: 0; bottom: 0;
        width: 100%;
        min-height: 80vh;       /* vyšší panel */
        max-height: 95vh;       /* ale ať nepřesáhne displej */
        overflow-y: auto;
        padding: 18px 16px 24px;
        border-radius: 16px 16px 0 0;
    }

    .cookiebar__inner { flex-direction: column; gap: 14px; }
    .cookiebar__left { grid-template-columns: 32px 1fr; gap: 10px; }
    .cookiebar__icon { width: 32px; height: 32px; font-size: 18px; border-radius: 8px; }

    .cookiebar__title { font-size: 16px; margin-bottom: 4px; }
    .cookiebar__text  { font-size: 13px; margin-bottom: 10px; }

    .cookiebar__toggles { gap: 10px 16px; }
    .cookiebar__toggle  { font-size: 14px; gap: 8px; }

    .cookie-details { gap: 10px; }
    .cookie-category__header { font-size: 16px; padding: 12px 14px; }
    .cookie-category__providers { padding: 8px 14px 14px; }

    /* tlačítka – kompaktní, ale tři se vejdou */
    .cookiebar__right {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 16px;
    }
    .btn {
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 6px;
    }
}

/* Fullscreen detaily na mobilu */
@media (max-width: 640px) {
    .cookie-banner.cookiebar--inline.cookiebar--expanded {
        top: 0; left: 0; right: 0; bottom: 0;
        transform: none;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 18px 16px 24px;
    }
}