/* ==========================================================================
   COOKIE NOTICE (2026-10-13). Markup: core/templates/include/i_cookie_banner.html. Behaviour: cookie-consent.js.
   A card at the bottom left of the page (full width on a phone). It does not block the page: no overlay, no cookie wall.
   "Accept all" and "Reject non-essential" have the same look on purpose (equal prominence).
   ========================================================================== */

.ck-notice[hidden],
.ck-prefs[hidden] {
    display: none !important;
}

.ck-notice {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 2000;
    width: calc(100% - 2.5rem);
    max-width: 480px;
    color: #2c3e50;
    font-size: 0.93rem;
    line-height: 1.5;
}

.ck-card {
    position: relative;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    padding: 1.25rem 1.25rem 1.1rem;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(26, 60, 71, 0.28), 0 0 0 1px rgba(26, 60, 71, 0.08);
}
.ck-card:focus {
    outline: none;
}

.ck-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5b7480;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.ck-close:hover {
    background: #e8f3f6;
    color: #1a3c47;
}

.ck-title {
    margin: 0 2rem 0.4rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a3c47;
}

.ck-text {
    margin: 0 0 1rem;
    color: #374151;
}
.ck-link {
    color: #357a8a;
    font-weight: 600;
    white-space: nowrap;
}
.ck-link:hover {
    text-decoration: underline;
}

/* storage preferences */
.ck-prefs {
    margin: 0 0 1rem;
    padding: 0.9rem 0 0.2rem;
    border-top: 1px solid #e3edf0;
}
.ck-prefs-title {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a3c47;
}
.ck-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
}
.ck-row + .ck-row {
    border-top: 1px solid #eef3f5;
}
.ck-row-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.ck-row-name {
    font-weight: 600;
    color: #1a3c47;
}
.ck-row-desc {
    font-size: 0.85rem;
    color: #5b7480;
}

/* switch: a real checkbox underneath (keyboard and screen readers), styled as a switch */
.ck-switch {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    margin-top: 0.1rem;
}
.ck-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.ck-slider {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: #b9c7ce;
    transition: background 0.2s ease;
}
.ck-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}
.ck-switch input:checked + .ck-slider {
    background: #357a8a;
}
.ck-switch input:checked + .ck-slider::before {
    transform: translateX(18px);
}
.ck-switch input:focus-visible + .ck-slider {
    outline: 2px solid #357a8a;
    outline-offset: 2px;
}
.ck-switch-locked input {
    cursor: default;
}
.ck-switch-locked .ck-slider {
    opacity: 0.55;
}

/* buttons */
.ck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.ck-btn {
    flex: 1 1 130px;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
/* accept / reject: identical */
.ck-btn-choice {
    border: 2px solid #357a8a;
    background: #357a8a;
    color: #fff;
}
.ck-btn-choice:hover {
    background: #2b6572;
    border-color: #2b6572;
}
.ck-btn-outline {
    border: 2px solid #c7d6dc;
    background: #fff;
    color: #1a3c47;
}
.ck-btn-outline:hover {
    border-color: #357a8a;
    background: #f1f8fa;
}
.ck-btn:focus-visible,
.ck-close:focus-visible,
.ck-link:focus-visible {
    outline: 2px solid #1a3c47;
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .ck-notice {
        left: 0.6rem;
        bottom: 0.6rem;
        width: calc(100% - 1.2rem);
        max-width: none;
    }
    .ck-card {
        max-height: calc(100vh - 1.2rem);
        padding: 1rem 1rem 0.9rem;
    }
    .ck-actions {
        flex-direction: column;
    }
    .ck-btn {
        flex: 0 0 auto;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ck-slider,
    .ck-slider::before,
    .ck-btn,
    .ck-close {
        transition: none;
    }
}
