/* ================================================================
   AAP Franquias – Form Styles
   Font: Quicksand  |  Brand colours: #CDD2B4 / #8C9B6E / #000
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

/* ---------- Reset / Container ---------- */
.aap-form-wrap {
    font-family: 'Quicksand', sans-serif;
    max-width: 580px;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

/* ---------- Labels ---------- */
.aap-form .aap-field label {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 11px;
    line-height: 13.2px;
    letter-spacing: 0;
    color: #ffffff;
    margin-bottom: 6px;
    vertical-align: middle;
}

/* ---------- Inputs & Selects ---------- */
.aap-form .aap-field input[type="text"],
.aap-form .aap-field input[type="email"],
.aap-form .aap-field input[type="tel"],
.aap-form .aap-field select {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.30);
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0;
    color: #ffffff;
    vertical-align: middle;
    outline: none;
    transition: background 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.aap-form .aap-field input::placeholder,
.aap-form .aap-field select option[disabled] {
    color: rgba(255,255,255,0.65);
}

.aap-form .aap-field select option {
    color: #000;
    background: #fff;
}

.aap-form .aap-field input:focus,
.aap-form .aap-field select:focus {
    background: rgba(255,255,255,0.38);
    box-shadow: 0 0 0 2px rgba(141,155,110,0.55);
}

/* ---------- Select wrapper (custom chevron) ---------- */
.aap-select-wrap {
    position: relative;
}

.aap-select-wrap select {
    cursor: pointer;
    padding-right: 48px;
}

.aap-chevron {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-52%);
    color: rgba(255,255,255,0.70);
    font-size: 18px;
    pointer-events: none;
    line-height: 1;
}

/* ---------- Fields spacing ---------- */
.aap-form .aap-field {
    margin-bottom: 12px;
}

/* ---------- Label row (label + inline error side by side) ---------- */
.aap-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.aap-label-row label {
    margin-bottom: 0 !important;
}

/* ---------- Error messages ---------- */
.aap-error {
    font-family: 'Quicksand', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #ffaaaa;
    white-space: nowrap;
    /* no min-height – only appears when there's a message */
}

.aap-error:empty {
    display: none;
}

.aap-global-error {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #ffaaaa;
    margin-bottom: 10px;
}

.aap-global-error:empty {
    display: none;
}

/* ---------- Submit Button ---------- */
.aap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 18px 24px;
    background: #CDD2B4;
    border: 1px solid #8C9B6E;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #2d3a1c;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    letter-spacing: 0.5px;
    margin-top: 8px;
    gap: 8px;
}

.aap-btn:hover {
    background: #b8c098;
    box-shadow: 0 4px 18px rgba(140,155,110,0.35);
    transform: translateY(-1px);
}

.aap-btn:active {
    transform: translateY(0);
}

.aap-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Spinner ---------- */
.aap-spinner {
    width: 18px;
    height: 18px;
    animation: aap-spin 0.75s linear infinite;
}

@keyframes aap-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Success state ---------- */
.aap-form-success {
    text-align: center;
    padding: 48px 24px;
    animation: aap-fade-in 0.4s ease;
}

.aap-form-success svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.aap-success-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #ffffff;
    margin: 0 0 8px;
}

.aap-success-sub {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

@keyframes aap-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .aap-form .aap-field input[type="text"],
    .aap-form .aap-field input[type="email"],
    .aap-form .aap-field input[type="tel"],
    .aap-form .aap-field select {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 14px 16px;
    }

    .aap-btn {
        font-size: 16px;
        padding: 16px;
    }
}

/* ---------- Region row (Estado + Cidade) ---------- */
.aap-label-full {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3a3a3a;
    margin-bottom: 10px;
}

.aap-region-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.aap-region-col {
    display: flex;
    flex-direction: column;
}

.aap-region-col .aap-select-wrap select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .aap-region-row {
        grid-template-columns: 1fr;
    }
}
