/* Cookie Consent Banner Styles */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--stripe-bg-primary);
    border-top: 2px solid var(--stripe-accent-primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-family: var(--stripe-font-family);
}

.cookie-consent-banner.visible {
    transform: translateY(0);
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--stripe-space-lg);
    padding: var(--stripe-space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    margin: 0 0 var(--stripe-space-sm) 0;
    font-size: var(--stripe-text-lg);
    font-weight: 600;
    color: var(--stripe-text-primary);
}

.cookie-banner-text p {
    margin: 0;
    font-size: var(--stripe-text-sm);
    line-height: 1.5;
    color: var(--stripe-text-secondary);
}

.cookie-banner-buttons {
    display: flex;
    align-items: center;
    gap: var(--stripe-space-md);
    flex-shrink: 0;
}

/* Cookie Consent Panel Styles */

.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--stripe-space-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-consent-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.cookie-consent-panel {
    background: var(--stripe-bg-primary);
    border-radius: var(--stripe-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.cookie-panel-close {
    position: absolute;
    top: var(--stripe-space-lg);
    right: var(--stripe-space-lg);
    background: none;
    border: none;
    font-size: var(--stripe-text-2xl);
    color: var(--stripe-text-muted);
    cursor: pointer;
    padding: var(--stripe-space-xs);
    border-radius: var(--stripe-radius-sm);
    transition: all var(--stripe-transition);
    z-index: 10;
}

.cookie-panel-close:hover {
    background: var(--stripe-bg-secondary);
    color: var(--stripe-text-primary);
}

.cookie-panel-header {
    padding: var(--stripe-space-xl) var(--stripe-space-xl) 0;
    text-align: center;
    border-bottom: 1px solid var(--stripe-border-primary);
    margin-bottom: var(--stripe-space-xl);
}

.cookie-panel-header h2 {
    margin: 0 0 var(--stripe-space-sm) 0;
    font-size: var(--stripe-text-2xl);
    font-weight: 700;
    color: var(--stripe-text-primary);
}

.cookie-panel-header p {
    margin: 0;
    font-size: var(--stripe-text-sm);
    color: var(--stripe-text-secondary);
    line-height: 1.5;
}

.cookie-panel-content {
    padding: 0 var(--stripe-space-xl);
}

.cookie-panel-content h3 {
    margin: 0 0 var(--stripe-space-lg) 0;
    font-size: var(--stripe-text-lg);
    font-weight: 600;
    color: var(--stripe-text-primary);
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: var(--stripe-space-md);
    margin-bottom: var(--stripe-space-xl);
}

.cookie-category {
    background: var(--stripe-bg-secondary);
    border: 1px solid var(--stripe-border-primary);
    border-radius: var(--stripe-radius-md);
    padding: var(--stripe-space-lg);
    transition: all var(--stripe-transition);
}

.cookie-category:hover {
    border-color: var(--stripe-accent-primary);
    box-shadow: 0 4px 12px rgba(178, 34, 34, 0.1);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--stripe-space-sm);
}

.category-header h4 {
    margin: 0;
    font-size: var(--stripe-text-lg);
    font-weight: 600;
    color: var(--stripe-text-primary);
}

.essential-badge {
    background: var(--stripe-accent-primary);
    color: white;
    font-size: var(--stripe-text-xs);
    font-weight: 600;
    padding: var(--stripe-space-xs) var(--stripe-space-sm);
    border-radius: var(--stripe-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-description {
    margin: 0 0 var(--stripe-space-md) 0;
    font-size: var(--stripe-text-sm);
    color: var(--stripe-text-secondary);
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--stripe-border-primary);
    border-radius: 24px;
    transition: var(--stripe-transition);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--stripe-transition);
}

input:checked + .toggle-slider {
    background-color: var(--stripe-accent-primary);
}

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

/* Panel Footer */
.cookie-panel-footer {
    padding: var(--stripe-space-xl);
    border-top: 1px solid var(--stripe-border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--stripe-space-md);
    flex-wrap: wrap;
}

/* Cookie Button Styles */
.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 var(--stripe-space-lg);
    font-family: var(--stripe-font-family);
    font-size: var(--stripe-text-base);
    font-weight: 500;
    line-height: 20px;
    border-radius: var(--stripe-radius-md);
    border: 1px solid transparent;
    background-color: transparent;
    color: var(--stripe-text-primary);
    cursor: pointer;
    transition: var(--stripe-transition);
    text-decoration: none;
    white-space: nowrap;
}

.cookie-btn:focus {
    outline: none;
    box-shadow: var(--stripe-focus-ring);
}

.cookie-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-btn-primary {
    background-color: var(--stripe-accent-primary);
    color: #ffffff;
    border-color: var(--stripe-accent-primary);
}

.cookie-btn-primary:hover:not(:disabled) {
    background-color: #a82828;
    border-color: #a82828;
}

.cookie-btn-secondary {
    background-color: transparent;
    color: var(--stripe-text-primary);
    border-color: var(--stripe-border-primary);
}

.cookie-btn-secondary:hover:not(:disabled) {
    background-color: var(--stripe-bg-secondary);
}

.cookie-btn-outline {
    background-color: transparent;
    color: var(--stripe-text-primary);
    border-color: var(--stripe-border-primary);
}

.cookie-btn-outline:hover:not(:disabled) {
    background-color: var(--stripe-bg-secondary);
}

/* Message Toast */
.cookie-message {
    position: fixed;
    top: var(--stripe-space-xl);
    right: var(--stripe-space-xl);
    background: var(--stripe-bg-primary);
    border: 1px solid var(--stripe-border-primary);
    border-radius: var(--stripe-radius-md);
    padding: var(--stripe-space-md) var(--stripe-space-lg);
    box-shadow: var(--stripe-shadow-lg);
    color: var(--stripe-text-primary);
    font-size: var(--stripe-text-sm);
    font-weight: 500;
    z-index: 10002;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.cookie-message.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Dark theme support */
html[data-theme="dark"] .cookie-consent-banner {
    background: var(--stripe-bg-secondary);
    border-top-color: var(--stripe-accent-primary);
}

html[data-theme="dark"] .cookie-consent-panel {
    background: var(--stripe-bg-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: translateY(100%);
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--stripe-space-md);
        padding: var(--stripe-space-md);
    }

    .cookie-banner-text {
        text-align: center;
    }

    .cookie-banner-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-consent-overlay {
        padding: var(--stripe-space-sm);
    }

    .cookie-consent-panel {
        max-height: 95vh;
        margin: auto 0;
    }

    .cookie-panel-header {
        padding: var(--stripe-space-lg) var(--stripe-space-lg) 0;
    }

    .cookie-panel-content {
        padding: 0 var(--stripe-space-lg);
    }

    .cookie-panel-footer {
        padding: var(--stripe-space-lg);
        flex-direction: column;
        gap: var(--stripe-space-sm);
    }

    .cookie-categories {
        gap: var(--stripe-space-sm);
    }

    .cookie-category {
        padding: var(--stripe-space-md);
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--stripe-space-xs);
    }

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-message {
        top: var(--stripe-space-lg);
        right: var(--stripe-space-lg);
        left: var(--stripe-space-lg);
        max-width: none;
    }
}

@media (max-width: 480px) {
    .cookie-banner-content {
        padding: var(--stripe-space-sm);
    }

    .cookie-consent-panel {
        margin: var(--stripe-space-sm);
    }

    .cookie-panel-header h2 {
        font-size: var(--stripe-text-xl);
    }
}

/* Accessibility */
.cookie-btn:focus,
.cookie-toggle input:focus + .toggle-slider,
.cookie-panel-close:focus {
    box-shadow: var(--stripe-focus-ring);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
