/**
 * Brevo Custom Popup Styles
 */

/* Popup Overlay */
.brevo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Popup Container */
.brevo-popup-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: brevo-popup-slide-in 0.3s ease-out;
}

@keyframes brevo-popup-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Popup Content */
.brevo-popup-content {
    position: relative;
    padding: 30px;
}

/* Close Button */
.brevo-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.brevo-popup-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.brevo-popup-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Popup Body */
.brevo-popup-body {
    margin-top: 10px;
}

/* Form Styles */
.brevo-popup-body .brevo-newsletter-form {
    margin: 0;
}

.brevo-popup-body .form-row {
    margin-bottom: 20px;
}

.brevo-popup-body .form-row:last-child {
    margin-bottom: 0;
}

.brevo-popup-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.brevo-popup-body .required {
    color: #e74c3c;
}

.brevo-popup-body input[type="email"],
.brevo-popup-body input[type="text"],
.brevo-popup-body input[type="tel"],
.brevo-popup-body select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.brevo-popup-body input[type="email"]:focus,
.brevo-popup-body input[type="text"]:focus,
.brevo-popup-body input[type="tel"]:focus,
.brevo-popup-body select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.brevo-popup-body button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.brevo-popup-body button[type="submit"]:hover {
    background-color: #005a87;
}

.brevo-popup-body button[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Message Styles */
.brevo-success-message,
.brevo-error-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.brevo-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    text-align: center;
    padding: 30px 20px;
}

.brevo-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Success Message with Countdown Styles */
.brevo-success-message .success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
    font-weight: bold;
}

.brevo-success-message .success-title {
    font-size: 24px;
    font-weight: 600;
    color: #155724;
    margin-bottom: 15px;
}

.brevo-success-message .success-countdown {
    font-size: 16px;
    color: #6c757d;
    margin-top: 10px;
}

.brevo-success-message .success-countdown #countdown-number {
    font-weight: bold;
    color: #007cba;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .brevo-popup-overlay {
        padding: 10px;
    }
    
    .brevo-popup-container {
        max-width: 100%;
        margin: 0;
    }
    
    .brevo-popup-content {
        padding: 20px;
    }
    
    .brevo-popup-close {
        top: 10px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .brevo-popup-content {
        padding: 15px;
    }
    
    .brevo-popup-body input[type="email"],
    .brevo-popup-body input[type="text"],
    .brevo-popup-body input[type="tel"],
    .brevo-popup-body select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .brevo-popup-container {
        animation: none;
    }
    
    .brevo-popup-close {
        transition: none;
    }
    
    .brevo-popup-body input[type="email"],
    .brevo-popup-body input[type="text"],
    .brevo-popup-body input[type="tel"],
    .brevo-popup-body select,
    .brevo-popup-body button[type="submit"] {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .brevo-popup-overlay {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .brevo-popup-container {
        border: 2px solid #000;
    }
    
    .brevo-popup-body input[type="email"],
    .brevo-popup-body input[type="text"],
    .brevo-popup-body input[type="tel"],
    .brevo-popup-body select {
        border-width: 2px;
    }
}

/* Add padding below the last field before the button */
.brevo-newsletter-form .brevo-mapped-fields > .form-row:last-child {
    margin-bottom: 0;
}

.brevo-form-button-row {
    margin-top: 0;
} 