/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
}

.cookie-consent-text strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    color: #111827;
}

.cookie-consent-text p {
    margin: 0;
}

.cookie-consent-link {
    color: #2563eb;
    text-decoration: underline;
}

.cookie-consent-link:hover {
    color: #1d4ed8;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Buttons */
.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}

.cookie-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    border-color: transparent;
}

.cookie-btn-primary:hover {
    opacity: 0.9;
}

.cookie-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}

.cookie-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Modal Overlay */
.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overscroll-behavior: contain;
}

.cookie-modal {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.cookie-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: none;
    border-radius: 0.375rem;
    color: #6b7280;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.cookie-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.cookie-modal-close:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

/* Categories */
.cookie-category {
    padding: 1rem 0;
    border-top: 1px solid #f3f4f6;
}

.cookie-category:first-of-type {
    border-top: none;
    padding-top: 0;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-category-header strong {
    font-size: 0.9375rem;
    color: #111827;
}

.cookie-always-on {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: #059669;
    font-weight: 500;
}

.cookie-category-desc {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0.375rem 0 0;
    line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: background-color 0.2s;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #059669;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-toggle input:focus-visible + .cookie-toggle-slider {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Modal footer */
.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 640px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-actions {
        justify-content: stretch;
    }

    .cookie-consent-actions .cookie-btn {
        flex: 1;
    }

    .cookie-modal {
        max-width: none;
        margin: 0.5rem;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-toggle-slider,
    .cookie-toggle-slider::before,
    .cookie-btn,
    .cookie-modal-close {
        transition: none;
    }
}
