/**
 * Cookie Consent Styles
 */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    padding: 1.5rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(100%);
    /* Reserve space to prevent layout shift - will be overridden when visible */
    min-height: 0;
}

.cookie-consent-banner[style*="display: block"],
.cookie-consent-banner:not([style*="display: none"]) {
    transform: translateY(0);
}

/* Prevent layout shift when banner appears - banner is fixed so content doesn't shift */
/* No need to add padding to body since banner is position: fixed */

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

.cookie-consent-text h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-consent-text p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.cookie-consent-buttons .btn {
    white-space: nowrap;
}

.cookie-consent-buttons .btn-link {
    color: #666;
    text-decoration: underline;
    padding: 0.5rem 1rem;
}

.cookie-consent-buttons .btn-link:hover {
    color: #d97d0c;
}

/* Cookie Preferences Modal */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-preferences-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.cookie-preferences-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #1a1a1a;
}

.cookie-preferences-body {
    padding: 1.5rem;
}

.cookie-preferences-body > p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.cookie-category-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-description {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

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

.cookie-toggle input:disabled {
    cursor: not-allowed;
}

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

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

.cookie-toggle input:checked + .toggle-slider {
    background-color: #d97d0c;
}

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

.cookie-toggle input:disabled + .toggle-slider {
    background-color: #d97d0c;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-preferences-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

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

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

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

    .cookie-preferences-content {
        max-height: 95vh;
    }

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

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

