/* ── WhatsApp Form — Frontend ─────────────────────────────────────── */

.waf-wrapper {
    max-width: 560px;
    margin: 0 auto;
    font-family: inherit;
    --waf-accent: #dca54a;
    --waf-accent-soft: rgba(220, 165, 74, 0.22);
}

.waf-form { display: flex; flex-direction: column; gap: 16px; }

/* ── Field ───────────────────────────────────────────────────────── */
.waf-field { display: flex; flex-direction: column; gap: 6px; }

.waf-field label {
    font-weight: 600;
    font-size: .9rem;
    color: #333;
}

.waf-required { color: #d32f2f; margin-left: 2px; }

.waf-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 500;
    font-size: .9rem;
    color: #333;
    line-height: 1.4;
}
.waf-consent-input {
    margin-top: 2px;
}
.waf-consent-input.waf-invalid {
    outline: 2px solid #d32f2f;
    outline-offset: 2px;
}

.waf-choice-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0 2px;
}

.waf-choice-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #222;
}

.waf-choice-item input[type="radio"],
.waf-choice-item input[type="checkbox"] {
    margin: 0;
}

.waf-field input[type="text"],
.waf-field input[type="email"],
.waf-field input[type="tel"],
.waf-field textarea,
.waf-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: .95rem;
    line-height: 1.5;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    color: #222;
    font-family: inherit;
}

/* ── Placeholder color ───────────────────────────────────────────── */
.waf-field input::placeholder,
.waf-field textarea::placeholder {
    color: #aaa;
    opacity: 1; /* Firefox reduz opacidade por padrão */
}

/* ── Select: remove seta nativa para evitar duplicação ──────────── */
.waf-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.waf-field input:focus,
.waf-field textarea:focus,
.waf-field select:focus {
    outline: none;
    border-color: var(--waf-accent);
    box-shadow: 0 0 0 3px var(--waf-accent-soft);
}

.waf-field input.waf-invalid,
.waf-field textarea.waf-invalid,
.waf-field select.waf-invalid {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .1);
}

/* Custom select */
.waf-field select.waf-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.waf-select-custom {
    position: relative;
}

.waf-select-trigger {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 42px 10px 14px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font-size: .95rem;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.waf-select-trigger:focus {
    outline: none;
    border-color: var(--waf-accent);
    box-shadow: 0 0 0 3px var(--waf-accent-soft);
}

.waf-select-custom.is-open .waf-select-trigger {
    border-color: var(--waf-accent);
    box-shadow: 0 0 0 3px var(--waf-accent-soft);
}

.waf-select-caret {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: translateY(-65%) rotate(45deg);
}

.waf-select-custom.is-open .waf-select-caret {
    transform: translateY(-35%) rotate(-135deg);
}

.waf-select-menu {
    position: absolute;
    z-index: 99;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.waf-select-option {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    color: #222;
    text-align: left;
    padding: 10px 14px;
    cursor: pointer;
    font-size: .95rem;
}

.waf-select-option:hover {
    background: #faf7f1;
}

.waf-select-option.is-selected {
    background: var(--waf-accent);
    color: #111;
}

.waf-select-custom.waf-invalid .waf-select-trigger {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .1);
}

/* ── Submit button ───────────────────────────────────────────────── */
.waf-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    border: 2px solid;
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .02em;
    transition: filter .2s, transform .1s;
    width: 100%;
    font-family: inherit;
}
.waf-submit-btn:hover  { filter: brightness(1.1); }
.waf-submit-btn:active { transform: scale(.98); }
.waf-submit-btn svg    { flex-shrink: 0; }

/* ── Error message ───────────────────────────────────────────────── */
.waf-error-msg {
    color: #d32f2f;
    font-size: .875rem;
    font-weight: 600;
    min-height: 1.2em;
    padding-top: 2px;
}

/* ── Admin notice (phone not set) ─────────────────────────────────── */
.waf-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}
