/* CloudConsent Banner CSS – v1.3.0 – Pixel-perfect pill style */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ---------- Overlay ---------- */
.cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.cc-overlay[hidden] { display: none !important; }
.cc-overlay.cc-visible { opacity: 1; }

/* Bottom bar mode */
.cc-overlay.cc-pos-bottom {
    align-items: flex-end;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    backdrop-filter: none;
    padding: 1.5rem;
    pointer-events: none;
}
.cc-overlay.cc-pos-bottom .cc-banner {
    pointer-events: all;
    max-width: 480px;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.cc-overlay.cc-pos-bottom.cc-visible .cc-banner {
    transform: translateY(0);
    opacity: 1;
}

/* ---------- Banner card ---------- */
.cc-banner {
    background: #FFFFFF;
    color: #111111;
    border-radius: 20px;
    padding: 28px 28px 24px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.10),
        0 24px 48px rgba(0,0,0,0.08);
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
}
.cc-overlay.cc-pos-center.cc-visible .cc-banner {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ---------- Header (no close button in this style) ---------- */
.cc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 12px;
}
.cc-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111111;
    line-height: 1.2;
    letter-spacing: -0.3px;
}
.cc-close {
    background: transparent;
    border: none;
    color: #111111;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    opacity: 0.25;
    transition: opacity 0.2s, background 0.2s;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 3px;
}
.cc-close:hover { opacity: 0.6; background: rgba(0,0,0,0.05); }

/* ---------- Description ---------- */
.cc-desc {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    color: #333333;
    line-height: 1.55;
}

/* Privacy link – appears on new line below description */
#cc-privacy-link {
    display: block;
    margin-top: 6px;
    color: #111111;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(0,0,0,0.5);
    transition: text-decoration-color 0.2s;
    width: fit-content;
}
#cc-privacy-link:hover {
    text-decoration-color: #111111;
}

/* ---------- Quick actions – stacked full-width pills ---------- */
.cc-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

/* ---------- BASE button ---------- */
.cc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 999px;            /* ← PILL */
    transition: filter 0.18s ease, transform 0.1s ease;
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: -0.1px;
    line-height: 1;
}
.cc-btn:active { transform: scale(0.975); }
.cc-btn:focus-visible { outline: 3px solid rgba(0,0,0,0.35); outline-offset: 3px; }

/* Accept all – solid black pill */
.cc-btn--primary {
    background: #111111;
    color: #FFFFFF;
    border: 2px solid #111111;
}
.cc-btn--primary:hover { filter: brightness(1.18); }

/* Reject – lavender pill with border */
.cc-btn--secondary {
    background: #EEEEF8;
    color: #111111;
    border: 1.5px solid #D4D4E8;
}
.cc-btn--secondary:hover {
    background: #E5E5F5;
    border-color: #C4C4D8;
}

/* Manage preferences – smaller ghost pill */
.cc-btn--outline {
    background: transparent;
    color: #555555;
    border: 1.5px solid #DDDDDD;
    font-size: 14px;
    font-weight: 500;
    padding: 11px 24px;
}
.cc-btn--outline:hover {
    background: #F8F8FA;
    border-color: #C8C8C8;
}

/* ---------- Preferences panel ---------- */
.cc-prefs-panel {
    border-top: 1px solid #EBEBEB;
    margin-top: 18px;
    padding-top: 14px;
}
.cc-prefs-panel[hidden] { display: none; }

.cc-category {
    padding: 10px 0;
    border-bottom: 1px solid #F2F2F2;
}
.cc-category:last-of-type { border-bottom: none; }

.cc-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.cc-category-info { flex: 1; }
.cc-category-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111111;
    margin-bottom: 2px;
}
.cc-cat-desc {
    display: block;
    font-size: 12px;
    color: #666666;
    line-height: 1.45;
}

/* ---------- Toggle ---------- */
.cc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
    margin-top: 2px;
}
.cc-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cc-toggle-slider {
    position: absolute;
    inset: 0;
    background: #CCCCCC;
    border-radius: 24px;
    transition: background 0.25s ease;
}
.cc-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cc-toggle input:checked + .cc-toggle-slider { background: #111111; }
.cc-toggle input:checked + .cc-toggle-slider::before { transform: translateX(20px); }
.cc-toggle input:focus-visible + .cc-toggle-slider { outline: 2px solid #111111; outline-offset: 2px; }

/* ---------- Badge (Always active) ---------- */
.cc-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    margin-top: 3px;
}
.cc-badge--active {
    background: #EEEEF8;
    color: #666666;
    border: 1px solid #D4D4E8;
}

/* ---------- Prefs save button ---------- */
.cc-prefs-footer { margin-top: 14px; display: flex; }
.cc-prefs-footer .cc-btn { flex: 1; }

/* ---------- Footer ---------- */
.cc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #F0F0F0;
    font-size: 11px;
    color: #AAAAAA;
    flex-wrap: wrap;
    gap: 4px;
}
.cc-footer a { color: #AAAAAA; text-decoration: underline; }
.cc-footer a:hover { color: #666; }
/* Privacy link shown inline above buttons, hide from footer */
.cc-footer #cc-privacy-link { display: none; }

/* ---------- Reopen button ---------- */
.cc-reopen-btn {
    background: transparent;
    border: 1.5px solid #DDDDDD;
    border-radius: 999px;
    cursor: pointer;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #333333;
    transition: background 0.2s, border-color 0.2s;
    display: inline-block;
}
.cc-reopen-btn:hover { background: #F8F8FA; border-color: #C8C8C8; }
.cc-block-btn { font-size: 14px; padding: 11px 20px; }

/* ---------- Status ---------- */
.cc-status-display {
    padding: 12px;
    background: #F8F8FA;
    border-radius: 10px;
    font-size: 12px;
    font-family: monospace;
    color: #333;
    border: 1px solid #EBEBEB;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
    .cc-overlay { padding: 12px; align-items: flex-end; }
    .cc-banner {
        border-radius: 20px 20px 12px 12px;
        max-width: 100%;
        padding: 22px 20px 20px;
    }
    .cc-title { font-size: 20px; }
    .cc-desc, #cc-privacy-link { font-size: 14px; }
    .cc-btn { font-size: 14px; padding: 13px 20px; }
}
