/* Cookie banner + settings dialog (templates/_cookie_banner.html). */
.cc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2000;
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: #121824;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #008751;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    animation: cc-rise 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cc-rise {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-banner { animation: none; }
}

.cc-banner-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 135, 81, 0.18);
    color: #ffc107;
    font-size: 1.45rem;
}

.cc-banner-body { flex: 1 1 auto; min-width: 0; }

.cc-banner-title {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.cc-banner-text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.cc-banner-text a { color: #4cd39a; font-weight: 600; white-space: nowrap; }

.cc-banner-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.cc-btn:focus-visible { outline: 3px solid #ffc107; outline-offset: 2px; }
.cc-btn-primary { background: #008751; color: #fff; }
.cc-btn-primary:hover { background: #006b40; color: #fff; }
.cc-btn-outline { background: transparent; color: inherit; border-color: currentColor; }
.cc-banner .cc-btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.cc-banner .cc-btn-outline:hover { border-color: #fff; }
.cc-btn-link { background: transparent; color: rgba(255, 255, 255, 0.8); text-decoration: underline; padding-inline: 8px; }
.cc-btn-link:hover { color: #fff; }

/* Settings dialog */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 2010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cc-modal[hidden], .cc-banner[hidden] { display: none; }

.cc-modal-backdrop { position: absolute; inset: 0; background: rgba(18, 24, 36, 0.6); }

.cc-modal-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 22px;
    background: #fff;
    color: #121824;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.cc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.cc-modal-head h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }

.cc-close {
    border: 0;
    background: #f1f3f5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #121824;
    cursor: pointer;
}

.cc-modal-intro { color: #5b6472; font-size: 0.92rem; margin-bottom: 16px; }

.cc-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #e6ebe8;
    border-radius: 12px;
    cursor: default;
}

label.cc-option { cursor: pointer; }
.cc-option-text { display: flex; flex-direction: column; gap: 2px; }
.cc-option-text strong { font-size: 0.95rem; }
.cc-option-text span { color: #5b6472; font-size: 0.85rem; }

.cc-always {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 135, 81, 0.12);
    color: #006b40;
    font-size: 0.78rem;
    font-weight: 700;
}

.cc-switch { position: relative; flex: 0 0 auto; width: 48px; height: 28px; }
.cc-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }

.cc-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cfd6dd;
    transition: background 0.2s ease;
    pointer-events: none;
}

.cc-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-switch-track { background: #008751; }
.cc-switch input:checked + .cc-switch-track::after { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-switch-track { outline: 3px solid #ffc107; outline-offset: 2px; }

.cc-modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.cc-modal-actions .cc-btn { flex: 1 1 0; }
.cc-modal .cc-btn-outline { color: #121824; border-color: #cfd6dd; }
.cc-modal .cc-btn-outline:hover { border-color: #008751; color: #008751; }

.cc-modal-policy { display: block; margin-top: 14px; text-align: center; font-size: 0.85rem; color: #008751; font-weight: 600; }

/* Footer link + cookie policy page */
.cc-footer-link {
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.5);
    font: inherit;
    cursor: pointer;
}

.cc-footer-link:hover { color: #fff; }

.cp-settings-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 18px;
    margin-bottom: 24px;
    border: 1px solid #d7efe3;
    background: #f2faf6;
    border-radius: 14px;
}

.cp-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.cp-table { min-width: 520px; font-size: 0.92rem; }
.cp-table th { background: #f6f8f7; white-space: nowrap; }

@media (max-width: 767.98px) {
    .cc-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px;
    }
    .cc-banner-icon { width: 38px; height: 38px; font-size: 1.2rem; }
    .cc-banner-body { flex: 1 1 calc(100% - 50px); }
    .cc-banner-actions { flex: 1 1 100%; flex-wrap: wrap; }
    .cc-banner-actions .cc-btn-outline,
    .cc-banner-actions .cc-btn-primary { flex: 1 1 0; }
    .cc-banner-actions .cc-btn-link { order: 3; flex: 1 1 100%; padding-block: 4px; }
    .cc-modal { align-items: flex-end; padding: 0; }
    .cc-modal-panel { max-width: none; border-radius: 18px 18px 0 0; max-height: 90vh; }
}
