/* Modal V2 - Modern and conversion-focused design */
.modal-v2-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    overflow-y: auto; /* Enable scrolling on the overlay */
    padding: 0 0 50px 0; /* Add padding at bottom for scrolling */
}

.modal-v2-container {
    position: absolute;
    top: 50px; /* Position from top instead of center */
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    width: 95%;
    max-width: 1000px;
    margin-bottom: 50px; /* Add space at bottom */
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(7, 86, 228, 0.25);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden; /* Remove scrolling from container */
    padding: 0;
}

.modal-v2-container.active {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.modal-v2-overlay.active {
    opacity: 1;
    display: block;
}

/* Layout de duas colunas */
.modal-v2-columns {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 100%;
}

.modal-v2-column-left {
    flex: 1;
    padding: 40px;
    background: linear-gradient(135deg, #0756E4, #12B0F6);
    color: white;
    border-radius: 20px 0 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-v2-column-left * {
    color: white;
}

.modal-v2-column-left .modal-v2-benefit-text {
    color: white;
    font-weight: 400;
}

.modal-v2-column-right {
    flex: 1;
    padding: 40px;
    background: #ffffff;
    border-radius: 0 20px 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-v2-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    color: #0756E4;
    font-size: 22px;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-v2-close:hover {
    background-color: #f0f3ff;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(7, 86, 228, 0.25);
    color: #12B0F6;
}

.modal-v2-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    padding-bottom: 10px;
    color: white;
}

.modal-v2-subtitle {
    font-size: 16px;
    margin: 0;
    padding-bottom: 30px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.modal-v2-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modal-v2-form-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-v2-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.modal-v2-benefit-item {
    flex: 1 1 calc(50% - 15px);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 200px;
}

.modal-v2-benefit-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-v2-column-left .modal-v2-benefit-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.modal-v2-column-right .modal-v2-benefit-icon {
    background-color: rgba(7, 86, 228, 0.1);
    color: #0756E4;
}

.modal-v2-benefit-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.modal-v2-form-container {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.modal-v2-footer {
    padding: 0 40px 30px;
    text-align: center;
}

.modal-v2-privacy {
    font-size: 12px;
    line-height: 1.5;
}

.modal-v2-column-left .modal-v2-privacy {
    color: rgba(255, 255, 255, 0.9);
}

.modal-v2-column-left .modal-v2-privacy a {
    color: white;
    text-decoration: underline;
}

.modal-v2-column-right .modal-v2-privacy {
    color: #666;
}

.modal-v2-column-right .modal-v2-privacy a {
    color: #0756E4;
    text-decoration: none;
}

.modal-v2-privacy a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-v2-container {
        width: 95%;
        top: 30px; /* Position from top on mobile */
        margin-bottom: 30px;
    }
    
    .modal-v2-container.active {
        transform: translateX(-50%) scale(1);
    }
    
    .modal-v2-columns {
        flex-direction: column;
        height: auto;
    }
    
    .modal-v2-column-left,
    .modal-v2-column-right {
        width: 100%;
        padding: 25px;
        border-radius: 0;
        min-height: auto; /* Allow columns to size to content */
    }
    
    .modal-v2-column-left {
        border-radius: 20px 20px 0 0;
        padding-bottom: 30px;
    }
    
    .modal-v2-column-right {
        border-radius: 0 0 20px 20px;
        padding-top: 30px;
    }
    
    .modal-v2-benefit-item {
        flex: 1 1 100%;
    }
    
    .modal-v2-title {
        font-size: 24px;
    }
    
    .modal-v2-subtitle {
        font-size: 14px;
        padding-bottom: 20px;
    }
    
    .modal-v2-footer {
        padding: 0;
        margin-top: 20px;
    }
}

/* Estilos personalizados para o formulário HubSpot */
.modal-v2-form-container .hbspt-form {
    font-family: 'Nizzoli', Arial, sans-serif;
    max-width: 100%;
}

/* Estilos para a classe personalizada do formulário */
.modal-v2-hubspot-form {
    font-family: 'Nizzoli', Arial, sans-serif !important;
}

.modal-v2-hubspot-form .hs-form-field {
    margin-bottom: 15px !important;
    display: block !important;
}

.modal-v2-hubspot-form .hs-input {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #333 !important;
    background-color: #f9fafc !important;
    box-sizing: border-box !important;
}

.modal-v2-hubspot-form .hs-button {
    background: linear-gradient(90deg, #0756E4, #12B0F6) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    width: 100% !important;
    margin-top: 10px !important;
}

/* Container do formulário */
.modal-v2-form-container .hs-form {
    display: block;
    margin-bottom: 20px;
}

/* Corrigindo campos ocultos */
.modal-v2-form-container .hs-form-field {
    margin-bottom: 15px;
    display: block;
    width: 100%;
}

.modal-v2-form-container .hs-fieldtype-text,
.modal-v2-form-container .hs-fieldtype-textarea,
.modal-v2-form-container .hs-fieldtype-select,
.modal-v2-form-container .hs-fieldtype-booleancheckbox,
.modal-v2-form-container .hs-fieldtype-radio {
    display: block;
    width: 100%;
}

/* Campos de input */
.modal-v2-form-container .hs-form .hs-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #f9fafc;
    box-sizing: border-box;
    margin-bottom: 8px;
    display: block;
}

.modal-v2-form-container .hs-form .hs-input:focus {
    border-color: #0756E4;
    box-shadow: 0 0 0 3px rgba(7, 86, 228, 0.15);
    outline: none;
    background-color: #fff;
}

/* Labels */
.modal-v2-form-container .hs-form label {
    font-weight: 500;
    font-size: 14px;
    color: #444;
    margin-bottom: 6px;
    display: block;
}

/* Botão de envio */
.modal-v2-form-container .hs-form .hs-button.primary {
    background: linear-gradient(90deg, #0756E4, #12B0F6);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin-top: 8px;
    box-shadow: 0 4px 10px rgba(7, 86, 228, 0.2);
}

.modal-v2-form-container .hs-form .hs-button.primary:hover {
    background: linear-gradient(90deg, #064bcc, #0e9bd8);
    box-shadow: 0 6px 15px rgba(7, 86, 228, 0.3);
    transform: translateY(-2px);
}

.modal-v2-form-container .hs-form .hs-button.primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(7, 86, 228, 0.2);
}

/* Mensagens de erro */
.modal-v2-form-container .hs-form .hs-error-msgs {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}

.modal-v2-form-container .hs-form .hs-error-msgs label {
    color: #e74c3c;
    font-size: 12px;
    font-weight: 400;
}

/* Campos obrigatórios */
.modal-v2-form-container .hs-form .hs-form-required {
    color: #e74c3c;
    margin-left: 4px;
}

/* Checkbox e radio buttons */
.modal-v2-form-container .hs-form .inputs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-v2-form-container .hs-form .inputs-list .hs-form-checkbox,
.modal-v2-form-container .hs-form .inputs-list .hs-form-radio {
    margin-bottom: 8px;
}

.modal-v2-form-container .hs-form .inputs-list input[type="checkbox"],
.modal-v2-form-container .hs-form .inputs-list input[type="radio"] {
    margin-right: 8px;
}

/* Select dropdown */
.modal-v2-form-container .hs-form select.hs-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Espaçamento entre grupos de campos */
.modal-v2-form-container .hs-form .hs-form-field {
    margin-bottom: 0;
}

/* Estilo para o texto de agradecimento após o envio */
.modal-v2-form-container .submitted-message {
    text-align: center;
    padding: 30px 20px;
    font-size: 18px;
    color: #0756E4;
    line-height: 1.6;
    background-color: rgba(7, 86, 228, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(7, 86, 228, 0.1);
}
