/**
 * Cookie Consent Manager (CMP) Stylesheet - LGPD Compliance
 * Glassmorphism, CSS Transitions, HSL harmony, EventAgro Brand Identity
 */

/* Banner styling */
.ea-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    background: rgba(27, 62, 60, 0.95); /* Deep Teal primary background with slight opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
    max-width: 1200px;
    margin: 0 auto;
}

.ea-cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ea-cookie-banner-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 992px) {
    .ea-cookie-banner-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 40px;
    }
}

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

.ea-cookie-content h4 {
    margin: 0 0 8px 0;
    font-family: var(--font-headline, 'Playfair Display', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent, #7EC13C); /* Lime accent color */
}

.ea-cookie-content p {
    margin: 0;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.ea-cookie-link {
    color: var(--color-accent-light, #C8E86A);
    text-decoration: underline;
    transition: color 0.2s ease;
    font-weight: 500;
}

.ea-cookie-link:hover {
    color: var(--color-accent, #7EC13C);
}

.ea-cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

@media (max-width: 576px) {
    .ea-cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    .ea-cookie-buttons button {
        width: 100%;
        text-align: center;
    }
}

/* Button styles */
.ea-cookie-buttons button,
.ea-cookie-modal-footer button {
    font-family: var(--font-display, 'DM Sans', sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ea-btn-accept {
    background-color: var(--color-accent, #7EC13C);
    color: #1B3E3C;
}

.ea-btn-accept:hover {
    background-color: var(--color-accent-light, #C8E86A);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(126, 193, 60, 0.3);
}

.ea-btn-reject {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.ea-btn-reject:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.ea-btn-pref {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    padding: 12px 15px !important;
}

.ea-btn-pref:hover {
    color: #ffffff;
}

/* Modal preferences styling */
.ea-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.ea-cookie-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.ea-cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 36, 32, 0.7); /* Primaria escuro com opacity */
    backdrop-filter: blur(4px);
}

.ea-cookie-modal-box {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.ea-cookie-modal.show .ea-cookie-modal-box {
    transform: scale(1);
}

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

.ea-cookie-modal-header h3 {
    margin: 0;
    font-family: var(--font-headline, 'Playfair Display', Georgia, serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary-dark, #0F2420);
}

.ea-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
}

.ea-modal-close:hover {
    color: #333;
}

.ea-cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-secondary, #4A4A4A);
}

.ea-preference-item {
    background: var(--color-bg-alt, #F5F0E8);
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
    border: 1px solid rgba(27, 62, 60, 0.05);
}

.ea-pref-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ea-pref-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--color-primary-dark, #0F2420);
}

.ea-status-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
}

.ea-status-label.status-always {
    background: var(--color-teal-pale, #D0E8E6);
    color: var(--color-primary, #1B3E3C);
}

.ea-pref-desc p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.ea-cookie-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    background: #fafafa;
}

.ea-btn-save-prefs {
    background-color: var(--color-primary, #1B3E3C);
    color: #ffffff;
    width: auto;
}

.ea-btn-save-prefs:hover {
    background-color: var(--color-primary-dark, #0F2420);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 36, 32, 0.2);
}

/* Switch styling (iOS style checkbox toggle) */
.ea-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ea-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

.ea-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.ea-switch input:checked + .ea-slider {
    background-color: var(--color-accent, #7EC13C);
}

.ea-switch input:focus + .ea-slider {
    box-shadow: 0 0 1px var(--color-accent, #7EC13C);
}

.ea-switch input:checked + .ea-slider:before {
    transform: translateX(20px);
}

/* Floating Re-consent Trigger Button */
.ea-cookie-trigger-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: var(--color-primary, #1B3E3C);
    color: var(--color-accent, #7EC13C);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.9;
}

.ea-cookie-trigger-btn:hover {
    transform: scale(1.1) rotate(15deg);
    opacity: 1;
    background-color: var(--color-primary-dark, #0F2420);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Hide floating button when banner is visible */
.ea-cookie-banner.show ~ .ea-cookie-trigger-btn {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .ea-cookie-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 16px;
        border-radius: 8px;
    }
    .ea-cookie-trigger-btn {
        bottom: 16px;
        left: 16px;
        width: 40px;
        height: 40px;
    }
}
