/* Cookie consent banner - self-contained, no dependency on per-page styles */
#cookie-consent-root {
    --cc-primary: #50BED0;
    --cc-secondary: #2F61AB;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #ffffff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cc-banner-text {
    flex: 1 1 320px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin: 0;
}

.cc-banner-text a {
    color: var(--cc-secondary);
    text-decoration: underline;
}

.cc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.cc-btn {
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cc-btn-reject {
    background: #f0f4f8;
    color: #333;
}

.cc-btn-reject:hover {
    background: #e0e6ec;
}

.cc-btn-configure {
    background: #fff;
    color: var(--cc-secondary);
    border: 2px solid var(--cc-secondary);
    padding: 8px 18px;
}

.cc-btn-configure:hover {
    background: rgba(47, 97, 171, 0.08);
}

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

.cc-btn-accept:hover {
    background: #1e4a8a;
}

/* Preferences modal */
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cc-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
}

.cc-modal h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--cc-secondary);
}

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

.cc-category {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.cc-category:last-of-type {
    border-bottom: none;
}

.cc-category-info h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #333;
}

.cc-category-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

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

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

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

.cc-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

.cc-switch input:checked + .cc-slider {
    background-color: var(--cc-secondary);
}

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

.cc-switch input:disabled + .cc-slider {
    background-color: var(--cc-primary);
    opacity: 0.6;
    cursor: not-allowed;
}

.cc-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.cc-modal-actions .cc-btn {
    flex: 1 1 auto;
}

/* Floating button to reopen preferences at any time */
.cc-reopen-btn {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 99998;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

@media (max-width: 640px) {
    .cc-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .cc-banner-actions {
        justify-content: stretch;
    }

    .cc-banner-actions .cc-btn {
        flex: 1 1 0;
        text-align: center;
    }
}
