/* Extracted from inc/cookie-consent.inc.php */
/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--text-inverse) 0%, var(--grey-50) 100%);
    border-top: 3px solid var(--brand-gold);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    padding: 20px;
    animation: slideUp 0.5s ease-out;
}

/* Initially hide banner to prevent flash */
.cookie-banner-loading {
    display: none !important;
}

.consent-expiry-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    color: #856404;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulse 2s infinite;
}

.consent-expiry-notice i {
    color: #ffc107;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Professional modal mode for re-consent */
.cookie-consent-banner.consent-modal-mode {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    max-width: 800px;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Add backdrop for modal mode */
.cookie-consent-banner.consent-modal-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

.cookie-consent-text h3 {
    color: var(--text);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.cookie-consent-text p {
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}

.cookie-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.cookie-category {
    background: var(--grey-50);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--grey-150);
}

.cookie-category strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
}

.cookie-status {
    float: right;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.cookie-status.required {
    background: var(--success);
    color: white;
}

.cookie-status.optional {
    background: var(--warning);
    color: white;
}

.cookie-category small {
    display: block;
    color: var(--text-muted);
    margin-top: 5px;
}

.cookie-consent-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.btn-cookie {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cookie.accept-all {
    background: var(--success);
    color: white;
}

.btn-cookie.reject-all {
    background: var(--danger);
    color: white;
}

.btn-cookie.customize {
    background: var(--brand-gold);
    color: white;
}

.btn-cookie.learn-more {
    background: var(--info);
    color: white;
}

.btn-cookie:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cookie Modal Styles */
.cookie-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-consent-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--grey-150);
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.cookie-modal-body {
    padding: 20px;
}

.cookie-preference-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--grey-150);
    border-radius: 8px;
}

.cookie-preference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.cookie-toggle.disabled {
    background: var(--success);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.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(--grey-400);
    transition: 0.4s;
    border-radius: 30px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--brand-gold);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(30px);
}

.cookie-modal-footer {
    padding: 20px;
    border-top: 1px solid var(--grey-150);
    text-align: center;
}

.btn-cookie.save-preferences {
    background: var(--brand-gold);
    color: white;
    padding: 15px 30px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cookie-consent-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cookie-categories {
        grid-template-columns: 1fr;
    }

    .cookie-consent-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-cookie {
        flex: 1;
        min-width: 120px;
    }

    .cookie-modal {
        width: 95%;
        max-height: 90vh;
    }
}
