/* Cookie Banner - GDPR Compliant */
.cb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.cb-overlay.cb-visible { opacity: 1; visibility: visible; }

.cb-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.cb-banner.cb-visible { transform: translateY(0); }

.cb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
}

.cb-main {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.cb-content { flex: 1; min-width: 280px; }

.cb-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.cb-text {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

.cb-text a {
    color: #0066cc;
    text-decoration: underline;
}

.cb-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.cb-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}
.cb-btn:active { transform: scale(0.98); }

.cb-btn-accept {
    background: #22c55e;
    color: #fff;
}
.cb-btn-accept:hover { background: #16a34a; }

.cb-btn-reject {
    background: #f1f1f1;
    color: #333;
}
.cb-btn-reject:hover { background: #e5e5e5; }

.cb-btn-settings {
    background: transparent;
    color: #666;
    padding: 12px 16px;
    text-decoration: underline;
}
.cb-btn-settings:hover { color: #333; }

/* Settings Panel */
.cb-settings {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.cb-settings.cb-visible { display: block; }

.cb-category {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cb-category:last-child { border-bottom: none; }

.cb-category-info { flex: 1; }

.cb-category-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.cb-category-desc {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Toggle Switch */
.cb-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cb-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.2s;
}

.cb-toggle-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cb-toggle input:checked + .cb-toggle-slider { background: #22c55e; }
.cb-toggle input:checked + .cb-toggle-slider:before { transform: translateX(22px); }
.cb-toggle input:disabled + .cb-toggle-slider { background: #22c55e; opacity: 0.7; cursor: not-allowed; }

.cb-settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* Mobile */
@media (max-width: 600px) {
    .cb-container { padding: 16px; }
    .cb-main { flex-direction: column; gap: 16px; }
    .cb-actions { width: 100%; }
    .cb-btn { flex: 1; text-align: center; padding: 14px 16px; }
    .cb-btn-settings { flex: none; width: 100%; }
}

/* Floating Button to reopen */
.cb-reopen {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s;
}
.cb-reopen:hover { transform: scale(1.1); }
.cb-reopen.cb-visible { display: flex; }
