/* Stile per il modal automatico di iscrizione */
.brevo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    transition: opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.brevo-modal.show {
    opacity: 1;
    visibility: visible;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
}

.brevo-modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    margin: 30px auto;
    position: relative;
    box-shadow: 0px 4px 6px -2px rgba(44, 44, 44, 0.04), 0px 10px 16px -4px rgba(44, 44, 44, 0.10);
    animation: brevoModalSlideIn 0.5s ease-out;
}

@keyframes brevoModalSlideIn {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.brevo-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: #0098C1;
    border: 1px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 10;
    color: white;
}

.brevo-modal-close:hover {
    background-color: #007a9e;
}

.brevo-modal-close svg {
    width: 16px;
    height: 16px;
    color: white;
    pointer-events: none;
}

.brevo-modal-body {
    padding: 25px;
}

/* Stili per i componenti del form */

.brevo-text-title {
    font-size: 24px;
    color: #0098C1;
    font-family: "Inter", sans-serif;
    line-height: 36px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: left;
    padding-right: 30px; /* Spazio per il pulsante di chiusura */
}

.brevo-text-subtitle {
    font-size: 16px;
    color: #333;
    font-family: "Inter", sans-serif;
    line-height: 1.5em;
    margin-bottom: 20px;
    text-align: left;
}

/* Input e label */
.brevo-form-entry {
    margin-bottom: 15px;
}

.brevo-form-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    font-family: "Inter", sans-serif;
    margin-bottom: 6px;
    text-align: left;
}

.brevo-form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: "Inter", sans-serif;
}

.brevo-form-input:focus {
    border-color: #0098C1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 152, 193, 0.2);
}

.brevo-form-input::placeholder {
    color: #c0ccda;
}

/* Radio button */
.brevo-radio-group {
    margin-bottom: 15px;
}

.brevo-radio-label {
    display: block;
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 10px;
    text-align: left;
    font-family: "Inter", sans-serif;
}

.brevo-radio-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brevo-radio-option {
    display: flex;
    align-items: center;
}

.brevo-radio-option input[type="radio"] {
    margin-right: 8px;
}

/* Select */
.brevo-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: "Inter", sans-serif;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23444' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.brevo-select:focus {
    border-color: #0098C1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 152, 193, 0.2);
}

/* Checkbox */
.brevo-checkbox-option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.brevo-checkbox-option input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 4px;
}

.brevo-checkbox-label {
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    font-family: "Inter", sans-serif;
}

/* Submit Button */
.brevo-submit-button {
    width: 100%;
    padding: 12px;
    background-color: #0098C1;
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: "Inter", sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.brevo-submit-button:hover {
    background-color: #007a9e;
    transform: translateY(-1px);
}

/* Dichiarazione privacy */
.brevo-privacy-declaration {
    font-size: 11px;
    color: #687484;
    text-align: left;
    margin-top: 15px;
    line-height: 1.4;
}

.brevo-privacy-declaration a {
    color: #0098C1;
    text-decoration: none;
}

.brevo-privacy-declaration a:hover {
    text-decoration: underline;
}

/* Error messages */
.brevo-error-message {
    display: none;
    color: #fff;
    background-color: rgba(184, 23, 52, 0.7);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    margin-top: 5px;
}

.brevo-form-error .brevo-error-message {
    display: block;
}

/* Success modal */
.success-modal-content {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brevo-success-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 30px;
}

.success-icon {
    margin-bottom: 24px;
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.brevo-success-body .brevo-text-title {
    color: #0098C1;
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: 700;
    padding-right: 0; /* Reset padding for success title */
}

.brevo-success-body .brevo-text-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    max-width: 90%;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 600px) {
    .brevo-modal.show {
        align-items: center;
        padding: 0;
    }
    
    .brevo-modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .brevo-text-title {
        font-size: 22px;
        padding-right: 25px; /* Ridotto per mobile */
    }
    
    .brevo-text-subtitle {
        font-size: 14px; 
    }
    
    .brevo-form-entry {
        margin-bottom: 15px;
    }
    
    .brevo-form-input, 
    .brevo-select {
        padding: 10px;
        font-size: 14px;
    }
    
    .brevo-form-label {
        font-size: 14px;
    }
    
    .brevo-radio-options {
        flex-direction: column;
    }
    
    .brevo-radio-option {
        margin-bottom: 8px;
    }
}
