@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600&display=swap');

:root {
    --cb-dark:       #0f1523;
    --cb-mid:        #1a2236;
    --cb-light:      #232f47;
    --cb-red:        #c90203;
    --cb-rm:         #ac403e;
    --cb-rs:         rgba(201,2,3,0.12);
    --cb-text:       #f4f6fb;
    --cb-muted:      #b8c2d8;
    --cb-border:     rgba(255,255,255,0.07);
    --cb-t:          0.26s cubic-bezier(0.4,0,0.2,1);
}

.cb-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    font-family: 'Sora', sans-serif;
    background: var(--cb-dark);
    border-top: 2px solid var(--cb-red);
    box-shadow: 0 -6px 32px rgba(0,0,0,0.4);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.42s cubic-bezier(0.34,1.2,0.64,1), opacity 0.3s ease;
}
.cb-container.cb-show {
    transform: translateY(0);
    opacity: 1;
}

/* Main row */
.cb-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 28px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Left */
.cb-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.cb-icon-wrap {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--cb-rs);
    border: 1px solid rgba(201,2,3,0.22);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cb-red);
}
.cb-icon-wrap svg { width: 18px; height: 18px; }

.cb-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 3px;
    letter-spacing: -0.01em;
}

.cb-text {
    font-size: 11.5px;
    font-weight: 400;
    color: #c2cce0;
    line-height: 1.55;
    margin: 0;
}

.cb-policy-link {
    color: var(--cb-rm);
    text-decoration: none;
    border-bottom: 1px solid rgba(172,64,62,0.3);
    transition: color var(--cb-t);
}
.cb-policy-link:hover { color: var(--cb-text); }

/* Right */
.cb-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cb-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.cb-btn {
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 8px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--cb-t);
    white-space: nowrap;
}

.cb-btn--primary {
    background: var(--cb-red);
    color: #fff;
    box-shadow: 0 2px 10px rgba(201,2,3,0.3);
}
.cb-btn--primary:hover {
    background: #e00203;
    box-shadow: 0 3px 16px rgba(201,2,3,0.45);
    transform: translateY(-1px);
}

.cb-btn--outline {
    background: transparent;
    color: #c2cce0;
    border: 1px solid rgba(255,255,255,0.18);
}
.cb-btn--outline:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
}

.cb-btn--secondary {
    background: var(--cb-light);
    color: var(--cb-text);
    border: 1px solid var(--cb-border);
}
.cb-btn--secondary:hover {
    background: var(--cb-mid);
    border-color: rgba(255,255,255,0.15);
}

.cb-btn--full { width: 100%; margin-top: 4px; }

/* Settings gear button */
.cb-prefs-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--cb-border);
    color: rgba(138,150,176,0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--cb-t);
    padding: 0;
    flex-shrink: 0;
}
.cb-prefs-toggle svg { width: 15px; height: 15px; }
.cb-prefs-toggle:hover {
    color: var(--cb-muted);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
}
.cb-prefs-toggle.cb-active {
    color: var(--cb-rm);
    border-color: rgba(172,64,62,0.35);
    background: var(--cb-rs);
}

/* Preferences panel */
.cb-prefs-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
    border-top: 0px solid var(--cb-border);
}
.cb-prefs-panel.cb-open {
    max-height: 300px;
    border-top-width: 1px;
}

.cb-prefs-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.cb-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 14px;
    background: var(--cb-mid);
    border: 1px solid var(--cb-border);
    border-radius: 9px;
    flex: 1;
    min-width: 160px;
}

.cb-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cb-toggle-label {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--cb-text);
}

.cb-toggle-desc {
    font-size: 10px;
    font-weight: 300;
    color: var(--cb-muted);
}

/* Switch */
.cb-switch {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    flex-shrink: 0;
}
.cb-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.cb-slider {
    display: block;
    width: 36px;
    height: 20px;
    background: var(--cb-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: background var(--cb-t);
    position: relative;
}
.cb-slider::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 12px; height: 12px;
    background: var(--cb-muted);
    border-radius: 50%;
    transition: transform var(--cb-t), background var(--cb-t);
}
.cb-switch input:checked + .cb-slider {
    background: var(--cb-red);
    border-color: var(--cb-red);
}
.cb-switch input:checked + .cb-slider::after {
    background: #fff;
    transform: translateX(16px);
}
.cb-switch input:disabled + .cb-slider { opacity: 0.5; }
.cb-switch--locked { cursor: not-allowed; }

/* Responsive */
@media (max-width: 768px) {
    .cb-inner {
        flex-wrap: wrap;
        padding: 14px 16px 12px;
        gap: 12px;
    }
    .cb-right { width: 100%; justify-content: flex-end; }
    .cb-actions { flex: 1; }
    .cb-btn { flex: 1; font-size: 11.5px; }
    .cb-prefs-inner { padding: 12px 16px; }
    .cb-toggle-row { min-width: 130px; }
}
