/* ===== Cookie Settings Button ===== */
.consent-settings-btn {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-gray-900);
    border: 1px solid var(--color-gray-700);
    color: var(--color-gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.consent-settings-btn:hover {
    background: var(--color-gray-800);
    color: var(--color-white);
    transform: scale(1.05);
}

.consent-settings-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4);
}

.consent-settings-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== Cookie Consent Banner (Modal Style) ===== */
.consent-banner {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.consent-banner.visible {
    opacity: 1;
    visibility: visible;
}

.consent-banner-inner {
    background: var(--color-white);
    border-radius: 12px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* ===== Banner Header ===== */
.consent-banner-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.consent-logo {
    height: 28px;
    width: auto;
}

/* ===== Tabs ===== */
.consent-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-gray-200);
}

.consent-tab {
    flex: 1;
    padding: 1rem 0.5rem;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-gray-500);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.consent-tab:hover {
    color: var(--color-gray-700);
}

.consent-tab.active {
    color: var(--color-gray-900);
}

.consent-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-gray-900);
}

/* ===== Tab Content ===== */
.consent-tab-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
    max-height: 400px;
}

.consent-tab-pane {
    display: none;
}

.consent-tab-pane.active {
    display: block;
}

.consent-pane-title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.75rem;
}

.consent-pane-text {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.consent-pane-text:last-child {
    margin-bottom: 0;
}

.consent-pane-text--muted {
    color: var(--color-gray-500);
}

/* ===== Consent Categories ===== */
.consent-category {
    padding: 1rem;
    background: var(--color-gray-50);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--color-gray-100);
}

.consent-category:last-child {
    margin-bottom: 0;
}

.consent-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.consent-category-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-category-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-gray-900);
}

.consent-category-count {
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

.consent-category-description {
    font-size: 0.8125rem;
    color: var(--color-gray-600);
    line-height: 1.5;
    margin: 0;
}

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

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

.consent-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--color-gray-300);
    border-radius: 26px;
    transition: background 0.2s ease;
}

.consent-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--color-white);
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.consent-toggle input:checked + .consent-toggle-slider {
    background: var(--color-blue);
}

.consent-toggle input:checked + .consent-toggle-slider::before {
    transform: translateX(22px);
}

.consent-toggle input:focus-visible + .consent-toggle-slider {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.consent-toggle--disabled .consent-toggle-slider {
    cursor: not-allowed;
    opacity: 0.7;
}

.consent-toggle--disabled input:checked + .consent-toggle-slider {
    background: var(--color-gray-400);
}

/* ===== Banner Actions ===== */
.consent-banner-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--color-gray-200);
    background: var(--color-gray-50);
}

.consent-btn {
    flex: 1;
    padding: 0.875rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-align: center;
}

.consent-btn--primary {
    background: var(--color-blue);
    color: var(--color-white);
}

.consent-btn--primary:hover {
    background: var(--color-blue-dark);
}

.consent-btn--secondary {
    background: var(--color-white);
    color: var(--color-gray-700);
    border: 1px solid var(--color-gray-300);
}

.consent-btn--secondary:hover {
    background: var(--color-gray-100);
    border-color: var(--color-gray-400);
}

.consent-btn--tertiary {
    background: var(--color-white);
    color: var(--color-gray-700);
    border: 1px solid var(--color-gray-300);
}

.consent-btn--tertiary:hover {
    background: var(--color-gray-100);
    border-color: var(--color-gray-400);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .consent-banner-inner {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .consent-banner-header {
        padding: 1rem;
    }
    
    .consent-tab {
        font-size: 0.8125rem;
        padding: 0.875rem 0.25rem;
    }
    
    .consent-tab-content {
        padding: 1rem;
        max-height: 300px;
    }
    
    .consent-banner-actions {
        flex-direction: column;
        padding: 1rem;
    }
    
    .consent-btn {
        width: 100%;
    }
    
    .consent-category {
        padding: 0.875rem;
    }
    
    .consent-category-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.125rem;
    }
    
    /* Move cookie button to right on mobile to avoid iOS home indicator */
    .consent-settings-btn {
        left: auto;
        right: 1rem;
    }
}
