/*
 * Gerador de Link para WhatsApp (UP Consultas).
 * Complementa pages.css; carregado só por /ferramentas/gerador-link-whatsapp.html.
 */

.wa-hero { padding: clamp(40px, 5vw, 64px) 0 clamp(32px, 4vw, 48px); }
.wa-hero .hero-copy { max-width: 820px; }
.wa-hero .hero-copy p.lead { margin-bottom: 1.25rem; }
.wa-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.wa-section { padding-top: clamp(32px, 4vw, 56px); }
.wa-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 960px) {
    .wa-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
    .wa-side { position: sticky; top: 96px; }
}

.wa-form { padding: 1.5rem; }
.wa-form h2, .wa-side h2 { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--navy-2); margin: 0 0 1rem; }
.wa-phone { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.wa-ddi { position: relative; }
.wa-ddi::before { content: "+"; position: absolute; left: 14px; bottom: 15px; font-weight: 600; color: var(--muted); pointer-events: none; }
.wa-ddi input { padding-left: 1.75rem !important; }
.wa-form .field input, .wa-form .field textarea { width: 100%; min-width: 0; }
.wa-form textarea { min-height: 130px; padding: .85rem 1rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: inherit; font-size: 16px; line-height: 1.5; color: var(--text); resize: vertical; }
.wa-form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(2, 140, 163, .15); }
.wa-form .field.has-error textarea { border-color: #C0392B; }
.wa-count { display: block; text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wa-count.is-over { color: #C0392B; font-weight: 600; }
.wa-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 1.5rem; }
.wa-form-actions .btn-primary { min-width: 170px; }
.wa-form .calc-link-btn { border: 0; background: none; padding: 6px 2px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.wa-side { padding: 1.5rem; }
.wa-link { display: flex; align-items: stretch; border: 2px solid var(--navy-2); border-radius: 12px; overflow: hidden; background: #fff; }
.wa-link code { flex: 1; min-width: 0; padding: .85rem 1rem; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.5; color: var(--ink); word-break: break-all; user-select: all; }
.wa-link code.is-empty { font-family: inherit; color: var(--muted); user-select: auto; }
.wa-link .btn { flex: none; border-radius: 0; min-width: 120px; }
.wa-link .btn.is-copied { background: var(--green-deep); color: #fff; }
.wa-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.wa-actions .btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.wa-actions .btn svg { width: 20px; height: 20px; }
/* mesmo verde do .btn-whatsapp do site, com texto escuro para contraste AA */
.wa-side .btn-whatsapp { color: #06301A; }
.wa-side .btn-whatsapp:hover { color: #06301A; }
.btn-whatsapp.is-disabled, .wa-side .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.wa-status { min-height: 1.4em; margin-top: .75rem; font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.wa-status.is-ok { color: var(--green-deep); }
.wa-status.is-error { color: #C0392B; }
.wa-side .alert[hidden] { display: none; }

.wa-chat { margin-top: 1.25rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.wa-chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #075E54; color: #fff; }
.wa-chat-head .wa-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.wa-chat-head .wa-avatar svg { width: 20px; height: 20px; }
.wa-chat-head strong { display: block; font-size: 14.5px; line-height: 1.2; }
.wa-chat-head span { display: block; font-size: 12px; opacity: .8; }
.wa-chat-body { padding: 18px 14px 14px; background: #EFEAE2; }
.wa-bubble { position: relative; margin-left: auto; max-width: 88%; width: fit-content; padding: 8px 10px 6px 12px; border-radius: 10px 0 10px 10px; background: #D9FDD3; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); }
.wa-bubble::after { content: ""; position: absolute; top: 0; right: -8px; border-width: 0 0 10px 8px; border-style: solid; border-color: transparent transparent transparent #D9FDD3; }
.wa-bubble p { margin: 0; font-size: 14.5px; line-height: 1.45; color: #111B21; white-space: pre-wrap; word-break: break-word; }
.wa-bubble p.is-empty { color: #667781; font-style: italic; }
.wa-bubble small { display: block; margin-top: 2px; text-align: right; font-size: 11px; color: #667781; }
.wa-chat-note { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: #54656F; }
.wa-privacy { display: flex; gap: 8px; align-items: flex-start; margin-top: 1rem; font-size: 13.5px; color: var(--muted); }
.wa-privacy .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--teal); flex: none; }

.wa-uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 900px) { .wa-uses { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (max-width: 600px) {
    .wa-form, .wa-side { padding: 1rem; }
    .wa-phone { grid-template-columns: 92px minmax(0, 1fr); }
    .wa-link { flex-direction: column; }
    .wa-link .btn { width: 100%; min-height: 48px; }
    .wa-actions { grid-template-columns: 1fr; }
    .wa-uses { grid-template-columns: 1fr; }
}
