/**
 * ConsentX Pro v3.0.0 — Premium CSS
 * Image-2 style: clean dark, perfect spacing, elegant borders
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@600;700&display=swap');

/* ── Reset ── */
#consentx-wrapper,
#consentx-wrapper * { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Keyframes ── */
@keyframes cx-slide-up   { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes cx-slide-down { from { transform: translateY(-24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes cx-scale-in   { from { transform: translate(-50%,-50%) scale(.9); opacity: 0; } to { transform: translate(-50%,-50%) scale(1); opacity: 1; } }
@keyframes cx-fade-in    { from { opacity: 0; } to { opacity: 1; } }
@keyframes cx-toast-in   { from { transform: translateX(-16px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes cx-dot        { 0%,100%{ opacity:1; } 50%{ opacity:.3; } }

/* ── Wrapper ── */
#consentx-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.55;
    overflow: hidden;
    position: relative;
    z-index: 999999;
}

/* ── Panel ── */
.cx-panel {
    padding: 22px 24px 20px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(128,128,128,.2) transparent;
}
.cx-panel::-webkit-scrollbar { width: 4px; }
.cx-panel::-webkit-scrollbar-thumb { background: rgba(128,128,128,.2); border-radius: 4px; }

/* ── Header ── */
.cx-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
}
.cx-logo-wrap { display: flex; align-items: center; gap: 9px; }
.cx-logo-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.cx-logo-badge {
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.7px;
    text-transform: uppercase; opacity: 0.6;
}

/* ── Close ── */
.cx-close {
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 13px; opacity: 0.7;
    transition: all .18s; flex-shrink: 0;
    font-family: inherit;
}
.cx-close:hover { opacity: 1; background: rgba(128,128,128,.1); }

/* ── Badge ── */
.cx-compliance-badge {
    display: inline-flex; align-items: center; gap: 5px;
    border-radius: 20px; padding: 3px 9px;
    font-size: 9px; font-weight: 700; letter-spacing: 0.6px;
    text-transform: uppercase; margin-bottom: 10px; width: fit-content;
}

/* ── Text ── */
.cx-title {
    font-family: 'Sora', 'Inter', -apple-system, sans-serif;
    font-size: 17px; font-weight: 700; line-height: 1.3;
    letter-spacing: -0.25px; margin-bottom: 8px;
}
.cx-desc { font-size: 13px; line-height: 1.65; margin-bottom: 18px; }
.cx-privacy-link { text-decoration: none; font-weight: 500; border-bottom: 1px solid transparent; transition: border-color .15s; }
.cx-privacy-link:hover { border-bottom-color: currentColor; }

/* ── Actions ── */
.cx-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: stretch; }

/* ── Buttons ── */
.cx-btn {
    flex: 1; min-width: 88px; padding: 11px 18px; border-radius: 10px;
    font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
    line-height: 1.2; font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.05px; transition: all .18s ease; text-align: center;
    display: inline-flex; align-items: center; justify-content: center;
}
.cx-btn:active { transform: scale(.97) translateY(1px) !important; }

/* ── Footer ── */
.cx-footer {
    margin-top: 14px; font-size: 10px; text-align: center;
    letter-spacing: 0.3px; opacity: 0.4;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ── Overlay ── */
#consentx-wrapper.cx-has-overlay::before {
    content: ''; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); z-index: -1; animation: cx-fade-in .25s;
}

/* ── Categories ── */
.cx-cats { margin-bottom: 16px; border-radius: 11px; overflow: hidden; }
.cx-cat-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 14px;
}
.cx-cat-row:not(:last-child) { border-bottom: 1px solid rgba(128,128,128,.1); }
.cx-cat-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cx-cat-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cx-cat-desc { font-size: 11.5px; margin-top: 3px; line-height: 1.5; opacity: .75; }
.cx-required-tag {
    font-size: 9px; font-weight: 700; border-radius: 4px;
    padding: 1px 5px; letter-spacing: .4px; text-transform: uppercase;
    opacity: .7;
}

/* ── Toggle Switch ── */
.cx-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.cx-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.cx-switch-track {
    position: absolute; inset: 0; border-radius: 24px;
    transition: background .22s ease; cursor: pointer;
}
.cx-switch-track::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    left: 3px; top: 3px; background: #fff; border-radius: 50%;
    transition: transform .22s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.cx-switch input:checked + .cx-switch-track::before { transform: translateX(18px); }
.cx-switch input:disabled + .cx-switch-track { opacity: 0.5; cursor: not-allowed; }

/* ── Utility ── */
.cx-hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 520px) {
    #consentx-wrapper {
        left: 0 !important; right: 0 !important;
        bottom: 0 !important; top: auto !important;
        max-width: 100% !important; width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
        transform: none !important;
    }
    .cx-btn { min-width: 76px; font-size: 12.5px; padding: 10px 14px; }
    .cx-panel { padding: 18px 20px 16px; }
}
