/* =========================================================
   cookie-consent.css
   ========================================================= */

/* ---------- Overlay ---------- */
.ccb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9998;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}
.ccb-overlay.ccb-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Bar / Card ---------- */
.ccb-bar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 460px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    z-index: 9999;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
}
.ccb-bar.ccb-visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ---------- Head ---------- */
.ccb-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem 0.5rem;
}
.ccb-description {
    padding: 0 1.5rem 1rem;
    font-size: 13px;
    line-height: 1.5;
    color: #444;
}
.ccb-description p {
    margin: 0 0 0.75rem;
}
.ccb-description p:last-child {
    margin-bottom: 0;
}
.ccb-headline {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #354581;
}
.ccb-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #555;
    cursor: pointer;
    line-height: 1;
    margin-top: -1.5rem;
    margin-right: -1rem;
    padding: 10px;
}

/* ---------- Groups ---------- */
.ccb-groups {
    padding: 0 1.5rem 1rem;
}
.ccb-group {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: .75rem;
    padding: .75rem 1rem;
}
.ccb-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ccb-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.ccb-group-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.ccb-toggle-details {
    background: none;
    border: none;
    color: #354581;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.ccb-toggle-details:hover {
    text-decoration: underline;
}

/* ---------- Toggle Switch ---------- */
.ccb-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.ccb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.ccb-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 20px;
    transition: .4s;
}
.ccb-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: #888;
    border-radius: 50%;
    transition: .4s;
}
.ccb-switch input:checked + .ccb-slider {
    background-color: #354581;
    border-color: #354581;
}
.ccb-switch input:checked + .ccb-slider:before {
    transform: translateX(16px);
    background-color: white;
}
.ccb-switch input:disabled + .ccb-slider {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
    cursor: not-allowed;
}
.ccb-switch input:disabled + .ccb-slider:before {
    background-color: #bbb;
}

/* ---------- Group Details ---------- */
.ccb-group-details {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #e5e5e5;
}
.ccb-group-details[hidden] {
    display: none;
}
.ccb-cookie-item {
    margin-bottom: .75rem;
    font-size: 12px;
}
.ccb-cookie-item:last-child {
    margin-bottom: 0;
}
.ccb-cookie-item strong {
    color: #222;
}
.ccb-cookie-item p {
    margin: .1rem 0;
    color: #666;
}
.ccb-meta {
    font-size: 11px;
    color: #999;
}

.ccb-cookie-item-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}
.ccb-cookie-item-head strong {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}
.ccb-cookie-meta-box {
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: .5rem .75rem;
    margin-top: .5rem;
}
.ccb-cookie-meta-box p {
    margin: .2rem 0;
    color: #555;
}
.ccb-cookie-meta-box strong {
    color: #333;
}
.ccb-switch input.ccb-switch-blue:checked + .ccb-slider {
    background-color: #fdfdfd; /* White track */
    border-color: #354581; /* Blue border */
}
.ccb-switch input.ccb-switch-blue:checked + .ccb-slider:before {
    background-color: #354581; /* Blue dot */
}

/* ---------- Actions ---------- */
.ccb-actions {
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    margin-top: .5rem;
}
.ccb-btn {
    padding: .5rem .8rem;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
}
.ccb-btn--outline {
    background: #fff;
    color: #354581;
    border: 1px solid #354581;
}
.ccb-btn--outline:hover {
    background: #f0f4f8;
}
.ccb-btn--primary {
    background: #c8102e;
    color: #fff;
    border: 1px solid #c8102e;
}
.ccb-btn--primary:hover {
    background: #a30d25;
}
.ccb-btn--secondary {
    background: #f2f2f2;
    color: #555;
    border: 1px solid #e5e5e5;
}
.ccb-btn--secondary:hover {
    background: #e5e5e5;
}

/* ---------- Footer ---------- */
.ccb-footer {
    text-align: center;
    padding: 0 1.5rem 1.5rem;
}
.ccb-footer p {
    color: #444;
    margin: 0 0 .5rem;
}
.ccb-footer-links {
    color: #354581;
    font-size: 13px;
}
.ccb-link {
    color: #354581;
    text-decoration: none;
}
.ccb-link:hover {
    text-decoration: underline;
}

/* ---------- Mobile ---------- */
@media (max-width: 500px) {
    .ccb-bar {
        width: 90%;
        padding: 1rem 0;
    }
    .ccb-actions {
        flex-direction: column;
    }
}
