/* ========================================
   COOKIE CONSENT BANNER STYLES
   ======================================== */

/* Overlay backdrop */
.cookie-consent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main banner container */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

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

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .cookie-consent-inner {
        padding: 2rem 2.5rem;
    }
}

/* Header */
.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-consent-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.cookie-consent-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1F2937;
    margin: 0;
}

/* Description text */
.cookie-consent-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4B5563;
    margin-bottom: 1.5rem;
}

.cookie-consent-text a {
    color: #2563EB;
    text-decoration: underline;
}

/* GDPR-specific notice */
.cookie-consent-gdpr-notice {
    background: #EFF6FF;
    border-left: 4px solid #2563EB;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.85rem;
    color: #1E40AF;
    display: none;
}

.cookie-consent-banner.gdpr .cookie-consent-gdpr-notice {
    display: block;
}

/* Button container */
.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .cookie-consent-buttons {
        justify-content: flex-start;
    }
}

/* Buttons */
.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #2563EB;
    color: white;
}

.cookie-btn-primary:hover {
    background: #1D4ED8;
}

.cookie-btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.cookie-btn-secondary:hover {
    background: #E5E7EB;
}

.cookie-btn-outline {
    background: transparent;
    color: #6B7280;
    border: 1px solid #D1D5DB;
}

.cookie-btn-outline:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

/* Manage preferences link */
.cookie-manage-link {
    font-size: 0.85rem;
    color: #6B7280;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.cookie-manage-link:hover {
    color: #2563EB;
}

/* ========================================
   PREFERENCES MODAL
   ======================================== */

.cookie-preferences-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-preferences-modal.active {
    display: flex;
}

.cookie-preferences-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.cookie-preferences-panel {
    position: relative;
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.cookie-preferences-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1F2937;
    margin: 0;
}

.cookie-preferences-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #F3F4F6;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.cookie-preferences-close:hover {
    background: #E5E7EB;
    color: #1F2937;
}

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

.cookie-preferences-footer {
    padding: 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Cookie category */
.cookie-category {
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

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

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

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

.cookie-category-name {
    font-weight: 700;
    color: #1F2937;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cookie-category-required {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-category-desc {
    padding: 1rem;
    font-size: 0.85rem;
    color: #6B7280;
    line-height: 1.5;
    border-top: 1px solid #E5E7EB;
}

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

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #D1D5DB;
    border-radius: 9999px;
    transition: background 0.2s ease;
}

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

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

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

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

/* Region indicator (small text showing detected region) */
.cookie-region-indicator {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 0.5rem;
}
