/* Cookie Consent Bottom Bar - Mobile-First Design */
/* Lightweight, accessible, SOC2 compliant cookie consent notification */

:root {
    --consent-bg: #1a1a2e;
    --consent-text: #ffffff;
    --consent-border: #006AB0;
    --consent-button-primary: #006AB0;
    --consent-button-secondary: #4a4a5e;
    --consent-button-hover: #0052cc;
}

/* Bottom notification bar */
.cookie-consent-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--consent-bg);
    border-top: 3px solid var(--consent-border);
    padding: 16px 20px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

.cookie-consent-bar.hidden {
    display: none;
}

/* Container for content */
.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* Message text */
.cookie-consent-message {
    color: var(--consent-text);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    margin: 0;
}

.cookie-consent-message .cookie-icon {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Buttons container */
.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Base button styles */
.cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 44px;
    min-width: 44px;
    white-space: nowrap;
}

/* Link button (Privacy Policy) */
.cookie-consent-btn.link {
    background: transparent;
    color: var(--consent-text);
    text-decoration: underline;
    padding: 10px 12px;
}

.cookie-consent-btn.link:hover {
    color: var(--consent-border);
}

/* Secondary button (Cookie Settings) */
.cookie-consent-btn.secondary {
    background: var(--consent-button-secondary);
    color: var(--consent-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-consent-btn.secondary:hover {
    background: #5a5a6e;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Primary button (Accept) */
.cookie-consent-btn.primary {
    background: var(--consent-button-primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 106, 176, 0.3);
}

.cookie-consent-btn.primary:hover {
    background: var(--consent-button-hover);
    box-shadow: 0 4px 8px rgba(0, 106, 176, 0.4);
    transform: translateY(-1px);
}

/* Decline button */
.cookie-consent-btn.decline {
    background: transparent;
    color: var(--consent-text);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-btn.decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Focus states for accessibility */
.cookie-consent-btn:focus {
    outline: 2px solid var(--consent-border);
    outline-offset: 2px;
}

/* Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-settings-modal.visible {
    display: flex;
    opacity: 1;
}

.cookie-settings-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-settings-modal.visible .cookie-settings-content {
    transform: scale(1);
}

.cookie-settings-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-settings-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--consent-bg);
}

.cookie-settings-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    min-width: 32px;
    min-height: 32px;
}

.cookie-settings-close:hover {
    color: #000;
}

.cookie-settings-body {
    padding: 24px;
}

.cookie-category {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

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

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-category-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--consent-bg);
}

.cookie-category-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.cookie-category-provider {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

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

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

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

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

.cookie-toggle input:focus + .cookie-toggle-slider {
    box-shadow: 0 0 0 2px rgba(0, 106, 176, 0.3);
}

/* Settings modal footer */
.cookie-settings-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-settings-footer .cookie-consent-btn {
    margin: 0;
}

/* Tablet and up */
@media (min-width: 768px) {
    .cookie-consent-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
    }

    .cookie-consent-message {
        text-align: left;
        flex: 1;
    }

    .cookie-consent-buttons {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
}

/* Desktop optimizations */
@media (min-width: 1024px) {
    .cookie-consent-bar {
        padding: 18px 40px;
    }

    .cookie-consent-message {
        font-size: 15px;
    }

    .cookie-consent-btn {
        font-size: 15px;
    }
}

/* Print - hide consent bar */
@media print {
    .cookie-consent-bar,
    .cookie-settings-modal {
        display: none !important;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-bar,
    .cookie-settings-content {
        transition: none;
    }
}
