/* ===================================================
   Widy — herramientas gratis (calculadora, enlace de WhatsApp)
   Se apoya en /css/styles.css y /diseno-web/web.css
   =================================================== */
.hero-tool { padding-bottom: 28px !important; }
.section-tool { padding-top: 28px !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.tool-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 30px; align-items: start; }
.tool-card-form { background: #fff; border: 1px solid var(--linea); border-radius: 24px; padding: 10px 30px 20px; }
.tq { border: 0; padding: 22px 0; margin: 0; border-bottom: 1px solid var(--linea); }
.tq:last-child { border-bottom: 0; }
.tq[hidden] { display: none; }
.tq legend { display: flex; align-items: center; gap: 12px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.2rem; margin-bottom: 14px; padding: 0; }
.tq legend small { font-family: 'Inter', sans-serif; font-weight: 500; font-size: .95rem; color: var(--gris); }
.tq-n { width: 34px; height: 34px; border-radius: 50%; background: #16161a; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.tq-help { font-size: .98rem; color: var(--gris); margin-top: 10px; }
.tq-help.error { color: #b91c1c; font-weight: 600; }

.opts { display: grid; gap: 10px; }
.opts-2 { grid-template-columns: repeat(2, 1fr); }
.opts-3 { grid-template-columns: repeat(3, 1fr); }
.opts-4 { grid-template-columns: repeat(4, 1fr); }
.opt { position: relative; cursor: pointer; }
.opt[hidden] { display: none; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt > span { display: flex; flex-direction: column; gap: 3px; min-height: 64px; justify-content: center; padding: 14px 16px; border: 2px solid #d5d1c8; border-radius: 16px; background: #fff; transition: border-color .15s, background .15s; }
.opt strong { font-size: 1.05rem; line-height: 1.3; }
.opt small { font-size: .92rem; line-height: 1.35; color: var(--gris); }
.opt-sm > span { min-height: 56px; padding: 12px 14px; }
.opt:hover > span { border-color: #16161a; }
.opt input:checked + span { border-color: #16161a; background: #16161a; color: #fff; }
.opt input:checked + span small { color: #d6d6da; }
.opt input:focus-visible + span { outline: 3px solid #16161a; outline-offset: 3px; }
.opt-check input:checked + span strong::before { content: "✓ "; }

.calc-out { position: sticky; top: 96px; background: #fff; border: 2px solid #16161a; border-radius: 24px; padding: 26px 24px 22px; box-shadow: 0 30px 60px -40px rgba(0,0,0,.4); }
.calc-out-tit { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.25rem; margin-bottom: 10px; }
.calc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.calc-row span { font-size: 1.02rem; color: #2e2e35; }
.calc-row strong { font-family: 'Sora', sans-serif; font-size: 1.12rem; text-align: right; }
.calc-note { font-size: .96rem; color: var(--gris); margin: 10px 0 0; }
.calc-widy { background: #16161a; color: #fff; border-radius: 18px; padding: 18px 18px 16px; margin: 18px 0 12px; }
.calc-widy-tit { font-size: .9rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #bdbdc4 !important; margin: 0 0 4px; }
.calc-widy-price { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; color: #fff !important; margin: 0 0 6px; }
.calc-widy-txt { font-size: 1rem; line-height: 1.5; color: #e6e6ea !important; margin: 0; }
.calc-sube { font-size: 1rem; line-height: 1.5; color: #2e2e35; margin: 0 0 14px; }
.calc-out .btn { width: 100%; margin-top: 8px; font-size: 1.02rem; padding: 14px 18px; min-height: 56px; }
.calc-priv { font-size: .92rem; color: var(--gris); text-align: center; margin: 12px auto 0; }

/* Enlace de WhatsApp */
.wa-num { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.wa-num select, .wa-num input, #wg-msg { width: 100%; font: inherit; font-size: 1.15rem; padding: 14px 16px; min-height: 58px; border: 2px solid #d5d1c8; border-radius: 14px; background: #fff; color: #16161a; }
.wa-num select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2316161a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
#wg-msg { min-height: 110px; resize: vertical; line-height: 1.5; margin-top: 12px; }
.wa-num select:focus, .wa-num input:focus, #wg-msg:focus { outline: none; border-color: #16161a; box-shadow: 0 0 0 4px rgba(0,0,0,.08); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .98rem; font-weight: 600; padding: 9px 14px; border-radius: 999px; border: 2px solid #d5d1c8; background: #fff; color: #16161a; cursor: pointer; }
.chip:hover { border-color: #16161a; }
.wa-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .98rem; line-height: 1.5; word-break: break-all; background: var(--crema); border: 1px solid var(--linea); border-radius: 14px; padding: 14px; min-height: 56px; margin: 0 0 6px; }
.wa-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wa-btns .btn { margin-top: 8px; }
.wa-out .btn[disabled], .wa-out .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.wa-qr { margin-top: 16px; text-align: center; }
.wa-qr canvas { width: 232px; height: 232px; max-width: 100%; border: 1px solid var(--linea); border-radius: 16px; background: #fff; }
.wa-code { margin-top: 14px; border-top: 1px solid var(--linea); padding-top: 12px; }
.wa-code summary { cursor: pointer; font-weight: 700; font-size: 1.02rem; padding: 6px 0; }
.wa-code textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; line-height: 1.45; padding: 12px; border: 1px solid var(--linea); border-radius: 12px; margin-top: 8px; background: var(--crema); resize: vertical; }

@media (max-width: 980px) {
  .tool-grid { grid-template-columns: 1fr; }
  .calc-out { position: static; }
  .opts-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tool-card-form { padding: 6px 18px 14px; }
  .opts-3, .opts-2 { grid-template-columns: 1fr; }
  .wa-num { grid-template-columns: 112px 1fr; }
}
