/* Cookie Consent Banner Styles */
/* Command Pal Pro - Cookie Consent UI */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

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

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

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

.cookie-consent-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.cookie-consent-text p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.cookie-consent-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-consent-buttons .btn {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding: 1rem;
}

.cookie-settings-modal.show {
    opacity: 1;
}

.cookie-settings-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

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

.cookie-settings-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-settings-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

.close-button:hover {
    color: var(--dark);
}

.cookie-settings-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

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

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

.cookie-category-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 0.5rem 0;
}

.cookie-category-header p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* Cookie Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

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

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

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

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: var(--primary);
    opacity: 0.6;
    cursor: not-allowed;
}

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
    }

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

    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
    }

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

    .cookie-settings-content {
        margin: 1rem;
    }

    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding: 1.25rem;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 1rem;
    }

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

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

@media (max-width: 576px) {
    .cookie-consent-banner {
        padding: 1rem 0;
    }

    .cookie-consent-text h3 {
        font-size: 1.1rem;
    }

    .cookie-consent-text p {
        font-size: 0.85rem;
    }

    .cookie-settings-header h2 {
        font-size: 1.25rem;
    }

    .cookie-category {
        padding: 1rem;
    }

    .cookie-category-header h4 {
        font-size: 1rem;
    }

    .cookie-category-header p {
        font-size: 0.85rem;
    }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top: 2px solid var(--dark);
    }

    .cookie-category {
        border: 2px solid var(--border);
    }

    .cookie-slider {
        border: 1px solid var(--dark);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-settings-modal,
    .cookie-settings-content,
    .cookie-slider,
    .cookie-slider:before {
        transition: none;
    }
}

/* Focus styles for accessibility */
.cookie-consent-buttons .btn:focus,
.close-button:focus,
.cookie-settings-footer .btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.cookie-switch input:focus + .cookie-slider {
    box-shadow: 0 0 0 3px rgba(107, 110, 212, 0.3);
}

/* Cookie settings link in footer */
.cookie-settings-link {
    cursor: pointer;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.cookie-settings-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
