/* ============================================
   COOKIE CONSENT STYLES (Standalone)
   For use on pages that don't load styles.css
   ============================================ */

:root {
    --cc-color-deep-cobalt: #0F172A;
    --cc-color-electric-blue: #2563EB;
    --cc-color-cyan: #06B6D4;
    --cc-color-white: #FFFFFF;
    --cc-color-gray-100: #F1F5F9;
    --cc-color-gray-200: #E2E8F0;
    --cc-color-gray-300: #CBD5E1;
    --cc-color-gray-400: #94A3B8;
    --cc-color-gray-500: #64748B;
    --cc-color-gray-600: #475569;
    --cc-gradient-primary: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    --cc-font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cc-radius-md: 0.5rem;
    --cc-radius-xl: 1rem;
    --cc-radius-full: 9999px;
    --cc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --cc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --cc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --cc-transition: 200ms ease;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.cookie-banner.visible {
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-banner-inner {
    max-width: 1280px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: var(--cc-radius-xl);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.12);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cookie-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

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

.cookie-banner-text p {
    font-size: 0.875rem;
    color: var(--cc-color-gray-600);
    line-height: 1.5;
    margin: 0;
    font-family: var(--cc-font-family);
}

.cookie-banner-text a {
    color: var(--cc-color-electric-blue);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--cc-radius-md);
    font-family: var(--cc-font-family);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--cc-transition);
    border: none;
    white-space: nowrap;
    min-height: 44px;
    min-width: 44px;
}

.cookie-btn-reject {
    background: transparent;
    color: var(--cc-color-gray-600);
    border: 1px solid var(--cc-color-gray-300);
}

.cookie-btn-reject:hover {
    background: var(--cc-color-gray-100);
    border-color: var(--cc-color-gray-400);
}

.cookie-btn-customize {
    background: var(--cc-color-gray-100);
    color: var(--cc-color-deep-cobalt);
}

.cookie-btn-customize:hover {
    background: var(--cc-color-gray-200);
}

.cookie-btn-accept {
    background: var(--cc-gradient-primary);
    color: var(--cc-color-white);
}

.cookie-btn-accept:hover {
    opacity: 0.9;
    box-shadow: var(--cc-shadow-md);
}

/* Cookie Preference Modal */
.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2001;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.cookie-modal {
    background: var(--cc-color-white);
    border-radius: var(--cc-radius-xl);
    box-shadow: var(--cc-shadow-xl);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-modal-overlay.visible .cookie-modal {
    transform: translateY(0);
}

.cookie-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--cc-color-gray-200);
}

.cookie-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cc-color-deep-cobalt);
    margin: 0;
    font-family: var(--cc-font-family);
}

.cookie-modal-header p {
    font-size: 0.875rem;
    color: var(--cc-color-gray-500);
    margin: 0.5rem 0 0;
    font-family: var(--cc-font-family);
}

.cookie-modal-body {
    padding: 1.5rem 2rem;
}

.cookie-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--cc-color-gray-100);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-info {
    flex: 1;
    padding-right: 1rem;
}

.cookie-category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cc-color-deep-cobalt);
    margin-bottom: 0.25rem;
    font-family: var(--cc-font-family);
}

.cookie-category-desc {
    font-size: 0.875rem;
    color: var(--cc-color-gray-500);
    line-height: 1.4;
    font-family: var(--cc-font-family);
}

.cookie-category-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cc-color-gray-400);
    background: var(--cc-color-gray-100);
    padding: 0.125rem 0.5rem;
    border-radius: var(--cc-radius-full);
    margin-top: 0.25rem;
    font-family: var(--cc-font-family);
}

.cookie-category-toggle {
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.cookie-modal-footer {
    padding: 1rem 2rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--cc-color-gray-200);
}

/* Cookie Settings Button (persistent, bottom-left) */
.cookie-settings-btn {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 1999;
    width: 44px;
    height: 44px;
    border-radius: var(--cc-radius-full);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 99, 235, 0.15);
    box-shadow: var(--cc-shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--cc-transition);
    opacity: 0;
    visibility: hidden;
}

.cookie-settings-btn.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-btn:hover {
    box-shadow: var(--cc-shadow-lg);
    border-color: rgba(37, 99, 235, 0.3);
    transform: scale(1.05);
}

/* Toggle Switch (used in cookie modal) */
.cookie-modal .toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

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

.cookie-modal .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--cc-color-gray-300);
    transition: 0.3s;
    border-radius: var(--cc-radius-full);
}

.cookie-modal .toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-modal .toggle-switch input:checked + .toggle-slider {
    background: var(--cc-gradient-primary);
}

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

/* Cookie consent responsive */
@media (max-width: 768px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

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

    .cookie-modal {
        max-height: 90vh;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

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

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

/* ============================================
   DARK MODE OVERRIDES (Cookie Consent)
   ============================================ */

[data-theme="dark"] .cookie-banner-inner {
    background: rgba(26, 34, 54, 0.95);
    border-color: #1e293b;
}

[data-theme="dark"] .cookie-banner-text p {
    color: #94a3b8;
}

[data-theme="dark"] .cookie-modal {
    background: #1a2236;
}

[data-theme="dark"] .cookie-modal-header {
    border-bottom-color: #1e293b;
}

[data-theme="dark"] .cookie-modal-header h3 {
    color: #f1f5f9;
}

[data-theme="dark"] .cookie-modal-header p {
    color: #94a3b8;
}

[data-theme="dark"] .cookie-category {
    border-bottom-color: #111827;
}

[data-theme="dark"] .cookie-category-name {
    color: #e2e8f0;
}

[data-theme="dark"] .cookie-category-desc {
    color: #94a3b8;
}

[data-theme="dark"] .cookie-category-badge {
    background: #111827;
    color: #64748B;
}

[data-theme="dark"] .cookie-modal-footer {
    border-top-color: #1e293b;
}

[data-theme="dark"] .cookie-btn-reject {
    color: #94a3b8;
    border-color: #2d3b53;
}

[data-theme="dark"] .cookie-btn-reject:hover {
    background: #111827;
    border-color: #334155;
}

[data-theme="dark"] .cookie-btn-customize {
    background: #111827;
    color: #e2e8f0;
}

[data-theme="dark"] .cookie-btn-customize:hover {
    background: #0f1629;
}

[data-theme="dark"] .cookie-settings-btn {
    background: rgba(26, 34, 54, 0.95);
    border-color: #1e293b;
}

[data-theme="dark"] .cookie-modal .toggle-slider {
    background-color: #334155;
}

[data-theme="dark"] .cookie-modal .toggle-slider:before {
    background-color: #0f1629;
}
