/* Cookie Consent Banner Styles */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--accent);
    padding: 1.5rem 5%;
    z-index: 9999;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
    /* Safari-friendly: use visibility + opacity instead of transform */
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease-in-out;
    /* Force GPU rendering for Safari */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Ensure it's above everything */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.cookie-consent.show {
    visibility: visible;
    opacity: 1;
}

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

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

.cookie-consent-text h3 {
    font-family: 'Syne', sans-serif;
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.cookie-consent-text p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

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

.cookie-consent-text a:hover {
    color: var(--secondary);
}

.cookie-consent-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    cursor: pointer;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: var(--accent);
    color: var(--primary);
}

.cookie-btn-accept:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.cookie-btn-deny {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--text-dim);
}

.cookie-btn-deny:hover {
    background: var(--surface-light);
    border-color: var(--accent);
    color: var(--accent);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.cookie-btn-settings:hover {
    background: var(--accent);
    color: var(--primary);
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.95);
    z-index: 10000;
    padding: 2rem;
    overflow-y: auto;
}

.cookie-settings-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-content {
    background: var(--surface);
    border: 2px solid var(--accent);
    padding: 3rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.cookie-settings-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.cookie-settings-close:hover {
    color: var(--accent);
}

.cookie-settings-content h2 {
    font-family: 'Syne', sans-serif;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.cookie-category {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 245, 212, 0.1);
}

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

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

.cookie-category h3 {
    font-family: 'Syne', sans-serif;
    color: var(--text);
    font-size: 1.3rem;
}

.cookie-category p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-toggle {
    position: relative;
    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: var(--text-dim);
    transition: 0.3s;
    border-radius: 26px;
}

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

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

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle-label {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.cookie-settings-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .cookie-btn {
        flex: 1;
        text-align: center;
    }

    .cookie-settings-content {
        padding: 2rem 1.5rem;
    }

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

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