/**
 * Cookie Consent Banner Styles - GDPR Compliant
 * Eliteair VIP Concierge Service
 */

/* Page Blocking */
.cookie-consent-blocking {
    position: relative;
}

.cookie-consent-blocking > *:not(#cookieConsentModal):not(#cookiePreferencesModal) {
    pointer-events: none;
    user-select: none;
}

/* Netflix-style Cookie Banner (Floating) */
.cookie-consent-banner {
    position: fixed;
    top: 80px;
    left: 1rem;
    right: 1rem;
    z-index: 10000;
    background: rgba(36, 36, 36, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(103, 217, 252, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    animation: slideDownBanner 0.4s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 900px;
    margin: 0 auto;
}

@keyframes slideDownBanner {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-modal-content {
    position: relative;
    background: rgba(42, 42, 42, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(103, 217, 252, 0.3);
    border-radius: 0.5rem;
    max-width: 480px;
    width: 100%;
    animation: cookieModalSlideIn 0.4s ease-out;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

@keyframes cookieModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-consent-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.cookie-consent-header h2 {
    color: #67d9fc;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.cookie-consent-header p {
    color: #d1d5db;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-consent-body {
    padding: 1rem 1.5rem;
}

.cookie-consent-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.cookie-info-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(55, 65, 81, 0.2);
    border-radius: 0.375rem;
    border: 1px solid rgba(75, 85, 99, 0.1);
}

.cookie-info-item h4 {
    color: #67d9fc;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}

.cookie-info-item p {
    color: #d1d5db;
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
}

.cookie-consent-privacy {
    font-size: 0.8rem !important;
    color: #9ca3af !important;
    text-align: center;
    margin: 1rem 0 0 0 !important;
}

.cookie-consent-privacy a {
    color: #67d9fc;
    text-decoration: none;
}

.cookie-consent-privacy a:hover {
    text-decoration: underline;
}

.cookie-consent-actions {
    padding: 0 1.5rem 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cookie-consent-actions .cookie-btn {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    text-align: center;
}

/* Netflix-style Banner Content */
.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.cookie-consent-text {
    text-align: center;
}

.cookie-consent-text p {
    color: #d1d5db;
    margin: 0;
    line-height: 1.5;
    font-size: 0.8rem;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Netflix-style Cookie Buttons */
.cookie-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-learn {
    background: transparent;
    color: #67d9fc;
    border: 1px solid #67d9fc;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-btn-learn:hover {
    background: rgba(103, 217, 252, 0.1);
    text-decoration: none;
}

.cookie-btn-reject {
    background: transparent;
    color: #d1d5db;
    border: 1px solid #6b7280;
}

.cookie-btn-reject:hover {
    background: rgba(107, 114, 128, 0.2);
    border-color: #9ca3af;
}

.cookie-btn-accept {
    background: #67d9fc;
    color: #242424;
    font-weight: 600;
}

.cookie-btn-accept:hover {
    background: #5bc5e8;
}

.cookie-btn-save {
    background: #67d9fc;
    color: #242424;
}

.cookie-btn-save:hover {
    background: #5bc5e8;
}

/* Cookie Preferences Modal */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-preferences-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-preferences-content {
    position: relative;
    background: rgba(42, 42, 42, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(103, 217, 252, 0.2);
    border-radius: 0.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-preferences-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid rgba(103, 217, 252, 0.1);
    margin-bottom: 1.5rem;
}

.cookie-preferences-header h2 {
    color: #67d9fc;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.cookie-close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.cookie-close-btn:hover {
    color: #67d9fc;
    background: rgba(103, 217, 252, 0.1);
}

.cookie-preferences-body {
    padding: 0 1.5rem;
}

.cookie-preferences-body > p {
    color: #d1d5db;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Cookie Categories */
.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 0.375rem;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cookie-toggle-wrapper {
    flex-shrink: 0;
}

.cookie-category-info h3 {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}

.cookie-required {
    color: #67d9fc;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-optional {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-category p {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* Custom Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #374151;
    transition: all 0.3s ease;
    border-radius: 24px;
    border: 1px solid #4b5563;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #9ca3af;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #67d9fc;
    border-color: #67d9fc;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
    background-color: #242424;
}

.cookie-toggle.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-toggle.disabled .cookie-toggle-slider {
    background-color: #67d9fc;
    border-color: #67d9fc;
}

.cookie-toggle.disabled .cookie-toggle-slider:before {
    transform: translateX(24px);
    background-color: #242424;
}

/* Footer */
.cookie-preferences-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(103, 217, 252, 0.1);
    text-align: center;
}

.cookie-preferences-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.button-spacer {
    width: 1.5rem;
    flex-shrink: 0;
}

.cookie-link {
    color: #67d9fc;
    text-decoration: none;
    font-size: 0.875rem;
    margin-left: auto;
    transition: color 0.2s ease;
}

.cookie-link:hover {
    color: #5bc5e8;
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Cookie Consent Modal Mobile */
    .cookie-consent-modal {
        padding: 1rem;
    }

    .cookie-consent-modal-content {
        max-width: 100%;
    }

    .cookie-consent-header {
        padding: 1.25rem 1.25rem 0 1.25rem;
    }

    .cookie-consent-header h2 {
        font-size: 1.25rem;
    }

    .cookie-consent-body {
        padding: 1rem 1.25rem;
    }

    .cookie-consent-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .cookie-consent-actions {
        padding: 0 1.25rem 1.25rem 1.25rem;
        flex-direction: column;
        align-items: center;
    }

    .cookie-consent-actions .cookie-btn {
        width: 100%;
        max-width: 280px;
    }

    /* Netflix-style Floating Banner Mobile */
    .cookie-consent-banner {
        top: 70px;
        left: 0.5rem;
        right: 0.5rem;
        padding: 0.75rem;
    }

    .cookie-consent-content {
        gap: 0.75rem;
    }

    .cookie-consent-text p {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .cookie-consent-actions {
        gap: 0.5rem;
    }

    .cookie-btn {
        min-width: 70px;
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }

    .cookie-preferences-content {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .cookie-preferences-header {
        padding: 1rem 1rem 0 1rem;
    }

    .cookie-preferences-body {
        padding: 0 1rem;
    }

    .cookie-preferences-footer {
        padding: 1rem;
    }

    .cookie-preferences-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cookie-preferences-buttons .cookie-btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .button-spacer {
        width: auto;
        height: 0.5rem;
    }

    .cookie-category-header {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 1rem;
    }

    .cookie-consent-text h3 {
        font-size: 1.125rem;
    }

    .cookie-consent-text p {
        font-size: 0.875rem;
    }

    .cookie-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    .cookie-consent-banner,
    .cookie-preferences-modal {
        display: none !important;
    }
}

.cookie-preferences-content {
    max-height: 70vh;
    width: 90vw;
    max-width: 900px;
}

.cookie-preferences-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

/* Two-column Layout */
.cookie-preferences-layout {
    display: flex;
    height: auto;                     /* kill previous 60vh / 5vh */
    min-height: 0;                    /* allow children to shrink */
    flex: 1;                          /* fill the content box */
    overflow: hidden;                 /* body area handles scroll */
}

/* Left Sidebar */
.cookie-categories-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(55, 65, 81, 0.2);
    border-right: 1px solid rgba(75, 85, 99, 0.3);
    max-height: none;
    overflow-y: auto;
}

.cookie-sidebar-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
    transition: all 0.2s ease;
    position: relative;
}

.cookie-sidebar-item:hover {
    background: rgba(103, 217, 252, 0.1);
}

.cookie-sidebar-item.active {
    background: rgba(103, 217, 252, 0.15);
    border-left: 3px solid #67d9fc;
    padding-left: calc(1.5rem - 3px);
}

.cookie-sidebar-item span {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.4;
    display: block;
}

.cookie-sidebar-item.active span {
    color: #ffffff;
    font-weight: 500;
}

/* Right Content Area */
.cookie-content-area {
    flex: 1;
    min-height: 0;
    padding: 1.5rem;
    overflow-y: auto;
}

.cookie-content-section {
    display: none;
    animation: fadeInContent 0.3s ease-in-out;
}

.cookie-content-section.active {
    display: block;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
}

.cookie-section-header h3 {
    color: #67d9fc;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.cookie-intro {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cookie-category {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 0;
    padding: 1.5rem 0;
    margin-bottom: 0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-category-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.cookie-category p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

/* Always Active Style */
.cookie-always-active {
    background: rgba(103, 217, 252, 0.2);
    color: #67d9fc;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Lifespan Information */
.cookie-lifespan {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Cookie Details Section */
.cookie-details-section {
    margin-top: 0.75rem;
}

.cookie-details-btn {
    background: none;
    border: none;
    color: #67d9fc;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-details-btn:hover {
    color: #5bc5e8;
}

.cookie-details-list {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(55, 65, 81, 0.2);
    border-radius: 0.375rem;
}

.cookie-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
}

.cookie-detail-item:last-child {
    border-bottom: none;
}

.cookie-domain {
    font-size: 0.875rem;
    color: #d1d5db;
}

.view-cookies {
    color: #67d9fc;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-cookies:hover {
    color: #5bc5e8;
    text-decoration: underline;
}

/* Updated Button Styles */
.cookie-preferences-footer {
    padding: 2rem;
    border-top: none;
}

.cookie-preferences-buttons {
    gap: 1rem;
    margin-bottom: 0;
}

.cookie-btn-primary {
    background: #67d9fc;
    color: #242424;
    padding: 0.875rem 2rem;
    font-weight: 600;
}

.cookie-btn-primary:hover {
    background: #5bc5e8;
}

.cookie-btn-secondary {
    background: transparent;
    color: #d1d5db;
    border: 1px solid #4b5563;
    padding: 0.875rem 2rem;
}

.cookie-btn-secondary:hover {
    background: rgba(75, 85, 99, 0.2);
    border-color: #6b7280;
}

/* Update toggle switch for consistency */
.cookie-toggle {
    width: 44px;
    height: 22px;
}

.cookie-toggle-slider:before {
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(22px);
}

/* Mobile Responsive for New Layout */
@media (max-width: 768px) {
    .cookie-preferences-content {
        width: 95vw;
        max-height: 90vh;
        margin: 1rem;
    }

    .cookie-preferences-layout {
        flex-direction: column;
        height: auto;
        max-height: 70vh;
    }

    .cookie-categories-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid rgba(75, 85, 99, 0.3);
        display: flex;
        flex-wrap: nowrap;
        padding: 0.5rem 0;
    }

    .cookie-sidebar-item {
        flex-shrink: 0;
        min-width: 140px;
        border-bottom: none;
        border-right: 1px solid rgba(75, 85, 99, 0.2);
        padding: 0.75rem 0.5rem;
        text-align: center;
    }

    .cookie-sidebar-item.active {
        border-left: none;
        border-bottom: 3px solid #67d9fc;
        padding-left: 0.5rem;
        padding-bottom: calc(0.75rem - 3px);
    }

    .cookie-sidebar-item span {
        font-size: 0.7rem;
        white-space: normal;
        line-height: 1.2;
        display: block;
        hyphens: auto;
        word-break: break-word;
    }

    .cookie-content-area {
        padding: 1.5rem;
        flex: 1;
        overflow-y: auto;
    }

    .cookie-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cookie-preferences-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }

    .cookie-preferences-header h2 {
        font-size: 1.25rem;
    }

    .cookie-preferences-footer {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cookie-categories-sidebar {
        height: auto;
        overflow-x: auto;
        padding: 0.5rem 0;
        max-height: 180px;
    }

    .cookie-sidebar-item {
        min-width: 120px;
        padding: 0.5rem 0.25rem;
    }

    .cookie-sidebar-item span {
        font-size: 0.65rem;
        line-height: 1.2;
        white-space: normal;
        word-break: break-word;
        hyphens: auto;
    }

    .cookie-content-area {
        padding: 1rem;
    }

    .cookie-section-header h3 {
        font-size: 1.1rem;
    }

    .cookie-preferences-header {
        padding: 1rem;
    }

    .cookie-preferences-footer {
        padding: 1rem;
    }

    .cookie-preferences-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cookie-btn {
        width: 100%;
    }
}
