/* Banza Bridge Foundation - Cookie Consent Styling
 * Implements glassmorphic design consistent with site styling
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    padding: 1.5rem;
    z-index: 10000;
    transition: bottom 0.5s ease-in-out;
    font-family: 'Poppins', sans-serif;
}

.cookie-consent-banner.active {
    bottom: 0;
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(235, 181, 64, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .cookie-consent-container {
        flex-direction: row;
        align-items: center;
    }
}

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

.cookie-consent-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #EBB540;
    margin-bottom: 0.5rem;
}

.cookie-consent-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 1rem;
}

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

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.cookie-accept {
    background: #EBB540;
    color: #1a1a1a;
}

.cookie-accept:hover {
    background: #E6C547;
}

.cookie-settings {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(235, 181, 64, 0.3);
    color: #333;
}

.cookie-settings:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 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(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-container {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(235, 181, 64, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-settings-modal.active .cookie-settings-container {
    transform: translateY(0);
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(235, 181, 64, 0.3);
}

.cookie-settings-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #EBB540;
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(235, 181, 64, 0.1);
}

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

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

.cookie-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.cookie-category-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 1rem;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    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: #ccc;
    transition: .4s;
    border-radius: 34px;
}

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

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

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

.cookie-category-toggle {
    display: flex;
    align-items: center;
}

.cookie-category-toggle-label {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.cookie-settings-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(235, 181, 64, 0.3);
}

.cookie-settings-save {
    background: #EBB540;
    color: #1a1a1a;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.cookie-settings-save:hover {
    background: #E6C547;
}

.cookie-settings-reject {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(235, 181, 64, 0.3);
    color: #333;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-settings-reject:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Cookie Preferences Button (Fixed) */
.cookie-preferences-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(235, 181, 64, 0.3);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-preferences-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cookie-preferences-button svg {
    width: 16px;
    height: 16px;
}

/* Accessibility */
.cookie-btn:focus,
.cookie-settings-close:focus,
.cookie-toggle input:focus + .cookie-toggle-slider,
.cookie-settings-save:focus,
.cookie-settings-reject:focus,
.cookie-preferences-button:focus {
    outline: 2px solid #EBB540;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-text,
    .cookie-category-title {
        color: #f5f5f5;
    }
    
    .cookie-category-description,
    .cookie-category-toggle-label {
        color: #ddd;
    }
    
    .cookie-settings-container {
        background: rgba(30, 30, 30, 0.9);
    }
    
    .cookie-settings-close {
        color: #f5f5f5;
    }
    
    .cookie-settings-reject,
    .cookie-preferences-button {
        color: #f5f5f5;
    }
}
