/* ================================================
   321SPEED / SVĚT SPORŤÁKŮ – COOKIE LIŠTA
   styles/cookie-consent.css
   ================================================ */

.cc-bar {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9500;
    max-width: 520px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    padding: 26px 28px 24px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.22, 1, .36, 1);
    overflow: hidden;
}

.cc-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary-color);
}

.cc-bar.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cc-bar[hidden] {
    display: none;
}

.cc-eyebrow {
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.cc-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}

.cc-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 18px;
}

.cc-text a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Tlačítka ── */
.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cc-btn {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 22px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    flex: 1 1 auto;
}

.cc-btn--accept {
    background: var(--primary-color);
    color: #fff;
}

.cc-btn--accept:hover {
    background: var(--primary-hover);
}

.cc-btn--reject {
    background: transparent;
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.18);
}

.cc-btn--reject:hover {
    border-color: rgba(255, 255, 255, 0.45);
}

.cc-btn--settings {
    background: transparent;
    color: var(--text-gray);
    border-color: transparent;
    flex: 0 0 auto;
    padding: 12px 10px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-btn--settings:hover {
    color: var(--text-light);
}

/* "Uložit volbu" se ukáže až v režimu nastavení, "Nastavení" se skryje */
.cc-btn--save {
    display: none;
    background: transparent;
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.18);
}

.cc-btn--save:hover {
    border-color: rgba(255, 255, 255, 0.45);
}

.cc-bar.settings .cc-btn--save {
    display: block;
}

.cc-bar.settings .cc-btn--settings {
    display: none;
}

/* Samostatné tlačítko mimo lištu (stránka Cookies) */
.cc-btn--standalone {
    display: inline-block;
    flex: 0 0 auto;
    margin-bottom: 26px;
}

/* Odkaz „Změnit nastavení“ v běžném textu / patičce */
.cc-inline-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.cc-inline-link:hover {
    color: var(--primary-hover);
}

/* ── Detailní nastavení ── */
.cc-details {
    display: none;
    margin: 4px 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
}

.cc-bar.settings .cc-details {
    display: block;
}

.cc-cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cc-cat:last-child {
    border-bottom: none;
}

.cc-cat-name {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.cc-cat-desc {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-gray);
}

/* Přepínač */
.cc-switch {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    margin-top: 2px;
}

.cc-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.cc-switch-track {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    transition: background 0.25s ease;
    pointer-events: none;
}

.cc-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s cubic-bezier(.22, 1, .36, 1);
}

.cc-switch input:checked ~ .cc-switch-track {
    background: var(--primary-color);
}

.cc-switch input:checked ~ .cc-switch-track::after {
    transform: translateX(20px);
}

.cc-switch input:focus-visible ~ .cc-switch-track {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.cc-switch input:disabled {
    cursor: default;
}

.cc-switch input:disabled ~ .cc-switch-track {
    background: rgba(255, 45, 45, 0.45);
}

/* ── Mobil ── */
@media (max-width: 600px) {
    .cc-bar {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 22px 20px 20px;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }

    /* Na malém displeji roluje jen výpis kategorií – tlačítka musí
       zůstat vidět bez rolování. */
    .cc-bar.settings .cc-details {
        max-height: 34vh;
        overflow-y: auto;
    }

    .cc-title {
        font-size: 1.1rem;
    }

    .cc-actions {
        flex-direction: column;
    }

    .cc-btn {
        width: 100%;
    }
}
