/* Cookie Consent Banner Styles */
.cookie-consent {
    position: fixed;
    bottom: -400px;
    /* Moved off-screen initially */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 9998;
    /* Below chat widget */
    transition: bottom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-top: 4px solid var(--primary-color, #0066FF);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cookie-consent.show {
    bottom: 0;
}

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

.cookie-text {
    flex: 1;
    min-width: 280px;
}

.cookie-text h3 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 1.15rem;
    font-weight: 700;
}

.cookie-text p {
    margin: 0;
    color: #4a4a4a;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--primary-color, #0066FF);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-text a:hover {
    color: #0052cc;
    text-decoration: none;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.cookie-btn.accept {
    background-color: var(--primary-color, #0066FF);
    color: white;
    border-color: var(--primary-color, #0066FF);
}

.cookie-btn.accept:hover {
    background-color: #0052cc;
    border-color: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 102, 255, 0.2);
}

.cookie-btn.outline {
    background-color: transparent;
    color: #555;
    border-color: #ddd;
}

.cookie-btn.outline:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

/* Modal Styles */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.cookie-modal-content {
    background-color: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9fafb;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a1a1a;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #000;
}

.cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.option-info {
    padding-right: 20px;
    flex: 1;
}

.option-info h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: #333;
}

.option-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.option-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
    justify-content: flex-end;
}

/* Custom Toggle Switch */
.toggle-switch {
    display: inline-block;
    width: 50px;
    height: 28px;
    background-color: #ccc;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked+.toggle-switch {
    background-color: var(--primary-color, #0066FF);
}

input[type="checkbox"]:checked+.toggle-switch::after {
    transform: translateX(22px);
}

input[type="checkbox"]:disabled+.toggle-switch {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-text {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
}

.cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background-color: #f9fafb;
    display: flex;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent {
        padding: 15px;
    }

    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 12px;
    }

    .cookie-text h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

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

    .cookie-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 8px;
    }

    .cookie-btn {
        width: auto;
        flex: 1;
        padding: 8px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .option-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .cookie-modal-content {
        width: 95%;
        height: auto;
        max-height: 95vh;
    }
}