/* Cookie Consent Banner + Preferences Modal */

#cc-root[hidden] { display: none !important; }
#cc-root *,
#cc-root *::before,
#cc-root *::after {
    box-sizing: border-box;
}

/* Bottom banner */
.cc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: #ffffff;
    color: #222;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    max-width: 1100px;
    margin: 0 auto;
}

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

.cc-banner-inner {
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
}

.cc-banner-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #222;
    width: 100%;
}

.cc-banner-desc {
    margin: 0;
    flex: 1 1 320px;
    min-width: 0;
    color: #444;
}

.cc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
    justify-content: flex-end;
}

/* Modal */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Open Sans', sans-serif;
}

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

.cc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.cc-modal-dialog {
    position: relative;
    background: #fff;
    color: #222;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cc-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.cc-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0 4px;
}

.cc-modal-close:hover { color: #000; }

.cc-modal-body {
    padding: 18px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cc-modal-intro {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

.cc-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

/* Categories */
.cc-category {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

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

.cc-category-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.cc-category-locked {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cc-category-desc {
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* Toggle switch */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
}

.cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cfcfcf;
    border-radius: 24px;
    transition: background 0.2s ease;
}

.cc-switch-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-switch-slider {
    background: #a54843;
}

.cc-switch input:checked + .cc-switch-slider::before {
    transform: translateX(20px);
}

.cc-switch input:focus-visible + .cc-switch-slider {
    box-shadow: 0 0 0 3px rgba(165, 72, 67, 0.35);
}

/* Buttons */
.cc-btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cc-btn-primary {
    background: #a54843;
    border-color: #a54843;
    color: #fff;
}
.cc-btn-primary:hover { background: #8c3a36; border-color: #8c3a36; }

.cc-btn-secondary {
    background: #f1f1f1;
    border-color: #d9d9d9;
    color: #222;
}
.cc-btn-secondary:hover { background: #e5e5e5; }

.cc-btn:focus-visible {
    outline: 2px solid #a54843;
    outline-offset: 2px;
}

/* Mobile tweaks */
@media (max-width: 640px) {
    .cc-banner-inner {
        padding: 16px;
    }
    .cc-banner-actions {
        width: 100%;
        justify-content: stretch;
    }
    .cc-banner-actions .cc-btn {
        flex: 1 1 auto;
        text-align: center;
    }
    .cc-modal-footer {
        flex-direction: column-reverse;
    }
    .cc-modal-footer .cc-btn {
        width: 100%;
    }
}
