/* HubSpot Form Custom Styles - Reutilizável */

/* Container do formulário */
.hs-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Fieldsets e campos */
.hs-form fieldset {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hs-form-field {
    margin-bottom: 24px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Forçar layout inline para campos de texto no hero */
.hero-form-content-full .hs-form fieldset {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
}

.hero-form-content-full .hs-form fieldset.form-columns-0,
.hero-form-content-full .hs-form fieldset.form-columns-1,
.hero-form-content-full .hs-form fieldset.form-columns-2 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
}

/* Campos de input, select e textarea - 5 por linha */
.hero-form-content-full .hs-fieldtype-text,
.hero-form-content-full .hs-fieldtype-email,
.hero-form-content-full .hs-fieldtype-phonenumber,
.hero-form-content-full .hs-fieldtype-select,
.hero-form-content-full .hs-fieldtype-textarea {
    flex: 1 1 calc(20% - 12px) !important;
    min-width: 180px !important;
    max-width: calc(20% - 12px) !important;
    margin-bottom: 0 !important;
}

/* Campos de radio e checkbox ocupam linha inteira */
.hero-form-content-full .hs-fieldtype-radio,
.hero-form-content-full .hs-fieldtype-booleancheckbox {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

/* Garantir que todos os inputs sejam visíveis */
.hs-form-field input,
.hs-form-field select,
.hs-form-field textarea {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    height: auto !important;
    min-height: 44px !important;
}

/* Forçar visibilidade de inputs específicos */
.hs-input,
input.hs-input,
select.hs-input,
textarea.hs-input {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Container de input */
.hs-fieldtype-text .input,
.hs-fieldtype-phonenumber .input,
.hs-fieldtype-select .input {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Labels */
.hs-form-field label {
    display: block !important;
    color: #1e293b !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
}

.hs-form-field label .hs-form-required {
    color: #dc2626 !important;
    margin-left: 2px !important;
}

/* Inputs de texto, email, tel */
.hs-input[type="text"],
.hs-input[type="email"],
.hs-input[type="tel"],
.hs-input[type="number"],
input.hs-input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.hs-input[type="text"]:focus,
.hs-input[type="email"]:focus,
.hs-input[type="tel"]:focus,
.hs-input[type="number"]:focus {
    outline: none !important;
    border-color: #1e3a8a !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
}

.hs-input[type="text"]:hover,
.hs-input[type="email"]:hover,
.hs-input[type="tel"]:hover,
.hs-input[type="number"]:hover {
    border-color: #cbd5e1 !important;
}

/* Textarea */
.hs-input[type="textarea"],
.hs-input textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    min-height: 100px !important;
    resize: vertical !important;
}

.hs-input[type="textarea"]:focus,
.hs-input textarea:focus {
    outline: none !important;
    border-color: #1e3a8a !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
}

/* Select */
.hs-input[type="select"],
select.hs-input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    cursor: pointer !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231e293b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    padding-right: 40px !important;
}

.hs-input[type="select"]:focus,
select.hs-input:focus {
    outline: none !important;
    border-color: #1e3a8a !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
}

/* Checkbox e Radio */
.hs-form-booleancheckbox,
.hs-form-radio {
    margin-bottom: 16px !important;
}

.hs-form-booleancheckbox label,
.hs-form-radio label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.hs-form-booleancheckbox input[type="checkbox"],
.hs-form-radio input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 10px !important;
    margin-top: 0 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.hs-form-radio label span,
.hs-form-booleancheckbox label span {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Mensagens de erro */
.hs-error-msgs {
    list-style: none !important;
    padding: 0 !important;
    margin: 8px 0 0 0 !important;
}

.hs-error-msg {
    color: #dc2626 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.hs-error-msg::before {
    content: "⚠" !important;
    font-size: 14px !important;
}

.hs-input.error,
.hs-input.invalid {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

/* Botão de submit */
.hs-submit {
    margin-top: 24px !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.hs-button,
input.hs-button,
input[type="submit"].hs-button {
    width: 100% !important;
    background: #f59e0b !important;
    color: #ffffff !important;
    padding: 14px 24px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    height: auto !important;
    min-height: 48px !important;
}

.hs-button:hover,
input.hs-button:hover,
input[type="submit"].hs-button:hover {
    background: #d97706 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4) !important;
}

.hs-button:active,
input.hs-button:active,
input[type="submit"].hs-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.hs-button:disabled,
input.hs-button:disabled,
input[type="submit"].hs-button:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Mensagem de sucesso */
.submitted-message {
    background: #f0fdf4 !important;
    border: 2px solid #86efac !important;
    border-radius: 8px !important;
    padding: 20px !important;
    color: #166534 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-align: center !important;
    line-height: 1.6 !important;
}

/* Helper text */
.hs-field-desc {
    color: #64748b !important;
    font-size: 13px !important;
    margin-top: 6px !important;
    line-height: 1.5 !important;
}

/* Legal consent */
.legal-consent-container {
    margin-top: 20px !important;
    padding-top: 20px !important;
    border-top: 1px solid #e2e8f0 !important;
}

.legal-consent-container .hs-form-booleancheckbox-display {
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
}

.legal-consent-container a {
    color: #1e3a8a !important;
    text-decoration: underline !important;
}

.legal-consent-container a:hover {
    color: #1e40af !important;
}

/* Campos dependentes */
.hs-dependent-field {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Multi-column layout (se houver) */
.hs-form .form-columns-2 .hs-form-field {
    width: 100% !important;
}

/* Loading state */
.hs-form.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* Formulário da seção de contato - 2 campos por linha */
.contact-form-content .hs-form fieldset {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.contact-form-content .hs-fieldtype-text,
.contact-form-content .hs-fieldtype-email,
.contact-form-content .hs-fieldtype-phonenumber,
.contact-form-content .hs-fieldtype-select,
.contact-form-content .hs-fieldtype-textarea {
    flex: 1 1 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    min-width: 200px !important;
    margin-bottom: 0 !important;
}

.contact-form-content .hs-fieldtype-radio,
.contact-form-content .hs-fieldtype-booleancheckbox {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

/* Responsive para formulário do hero */
@media (max-width: 1400px) {
    .hero-form-content-full .hs-fieldtype-text,
    .hero-form-content-full .hs-fieldtype-email,
    .hero-form-content-full .hs-fieldtype-phonenumber,
    .hero-form-content-full .hs-fieldtype-select,
    .hero-form-content-full .hs-fieldtype-textarea {
        flex: 1 1 calc(33.333% - 10px) !important;
        max-width: calc(33.333% - 10px) !important;
        min-width: 200px !important;
    }
}

@media (max-width: 1200px) {
    .hero-form-content-full .hs-fieldtype-text,
    .hero-form-content-full .hs-fieldtype-email,
    .hero-form-content-full .hs-fieldtype-phonenumber,
    .hero-form-content-full .hs-fieldtype-select,
    .hero-form-content-full .hs-fieldtype-textarea {
        flex: 1 1 calc(50% - 8px) !important;
        max-width: calc(50% - 8px) !important;
        min-width: 220px !important;
    }
}

@media (max-width: 968px) {
    .hero-form-content-full .hs-fieldtype-text,
    .hero-form-content-full .hs-fieldtype-email,
    .hero-form-content-full .hs-fieldtype-phonenumber,
    .hero-form-content-full .hs-fieldtype-select,
    .hero-form-content-full .hs-fieldtype-textarea {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }

    .contact-form-content .hs-fieldtype-text,
    .contact-form-content .hs-fieldtype-email,
    .contact-form-content .hs-fieldtype-phonenumber,
    .contact-form-content .hs-fieldtype-select,
    .contact-form-content .hs-fieldtype-textarea {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }
}

/* Responsive geral */
@media (max-width: 640px) {
    .hs-input[type="text"],
    .hs-input[type="email"],
    .hs-input[type="tel"],
    .hs-input[type="number"],
    .hs-input[type="select"],
    select.hs-input {
        padding: 10px 14px !important;
        font-size: 14px !important;
    }

    .hs-button {
        padding: 12px 20px !important;
        font-size: 15px !important;
    }

    .hs-form-field label {
        font-size: 13px !important;
    }
}
