/* Supa Booking · «Solicitar beca parcial»: un botón (en el theme MEGA Supafly, el mismo formato que «Comprar ahora») que abre un modal a pantalla completa
   con su flujo de pasos. Usa los tokens del theme (--c-*) y cae a valores propios. */

/* Banderas: Chrome y Edge en Windows no traen las banderas de países en su fuente de emojis; esta fuente (solo banderas, unicode-range) las dibuja. Licencias en assets/fonts/LICENSE.txt. */
@font-face { font-family: "Twemoji Country Flags"; src: url("../fonts/TwemojiCountryFlags.woff2") format("woff2"); unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E007F, U+E007F, U+200D; font-display: swap; }

.sbk-beca { margin: 0; }
.sbk-i { flex: none; }
.sbk-beca__btn .sbk-i { margin-right: 8px; }

/* Botones propios (solo cuando el theme no pone los suyos) */
.sbk-beca__btn--own, .sbk-beca__btn--solid { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 20px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.sbk-beca__btn--own { border: 1.5px solid var(--c-plum, #55694f); background: transparent; color: var(--c-sage-ink, #3f5a3a); }
.sbk-beca__btn--own:hover { background: rgba(255, 255, 255, .55); }
.sbk-beca__btn--solid { border: 0; background: var(--c-primary, #6f5a4a); color: #fff; }
.sbk-beca__send:disabled { opacity: .6; cursor: wait; }

/* Modal a pantalla completa */
html.sbk-beca-open { overflow: hidden; }
.sbk-modal { box-sizing: border-box; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--c-bg, #f6f0e9); color: var(--c-ink, #3b332d); }
.sbk-modal[open] { display: flex; flex-direction: column; }
.sbk-modal.is-fallback { position: fixed; inset: 0; z-index: 99999; }
.sbk-modal::backdrop { background: var(--c-bg, #f6f0e9); }
.sbk-modal__bar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 6px; }
.sbk-modal__progress { grid-column: 2; margin: 0; text-align: center; font-size: .875rem; font-weight: 600; color: var(--c-muted, #6b5f55); }
.sbk-modal__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.sbk-modal__icon[data-back] { grid-column: 1; grid-row: 1; }
.sbk-modal__icon--close { grid-column: 3; grid-row: 1; }
.sbk-modal__icon:hover { background: rgba(0, 0, 0, .06); }
.sbk-modal__meter { height: 4px; margin: 0 16px; border-radius: 4px; background: var(--c-line, #e6dccf); overflow: hidden; }
.sbk-modal__meter span { display: block; height: 100%; width: 50%; border-radius: 4px; background: var(--c-primary, #6f5a4a); transition: width .25s ease; }
.sbk-modal__body { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 20px max(28px, env(safe-area-inset-bottom)); overflow-y: auto; box-sizing: border-box; }
.sbk-modal__kicker { margin: 0 0 8px; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: var(--c-muted, #6b5f55); }
.sbk-modal__title { margin: 0 0 6px; font-family: var(--font-display, var(--font-ui, system-ui, sans-serif)); font-weight: 600; font-size: 1.5rem; line-height: 1.25; }
.sbk-modal__title:focus { outline: none; }
.sbk-beca__text { margin: 0 0 18px; font-size: 1rem; line-height: 1.5; color: var(--c-muted, #6b5f55); }

/* Campos (16 px: el teléfono no hace zoom al enfocar) */
.sbk-step { display: grid; gap: 16px; }
.sbk-f { margin: 0; }
.sbk-f label { display: block; margin: 0 0 6px; font-size: .9375rem; font-weight: 600; }
.sbk-f small { display: block; margin-top: 6px; font-size: .8125rem; color: var(--c-muted, #6b5f55); }
.sbk-f input, .sbk-f textarea { box-sizing: border-box; width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--c-line, #cfc3b4); border-radius: 14px; background: #fff; font: inherit; font-size: 1rem; color: inherit; }
.sbk-f textarea { min-height: 150px; resize: vertical; }
.sbk-f input[aria-invalid="true"] { border-color: var(--c-danger, #b42318); box-shadow: 0 0 0 1px var(--c-danger, #b42318); }
.sbk-f input:focus-visible, .sbk-f textarea:focus-visible { outline: 3px solid var(--c-focus, #5a4739); outline-offset: 1px; }

/* Correo: sugerencias de proveedores (gmail.com, hotmail.com…) */
.sbk-email { position: relative; }
.sbk-sug { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 6px; list-style: none; max-height: 280px; overflow-y: auto; border: 1px solid var(--c-line, #cfc3b4); border-radius: 14px; background: #fff; box-shadow: 0 12px 28px rgba(59, 51, 45, .16); }
.sbk-sug[hidden] { display: none; }
.sbk-sug li { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 1rem; white-space: nowrap; cursor: pointer; }
.sbk-sug li span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sbk-sug li strong { flex: none; font-weight: 700; }
.sbk-sug li:hover, .sbk-sug li[aria-selected="true"] { background: var(--c-plum-soft, #e3eadf); }

/* WhatsApp: selector de país (bandera + código) y número */
.sbk-phone { position: relative; display: flex; gap: 8px; }
.sbk-cc { flex: none; }
.sbk-cc__face { display: flex; align-items: center; gap: 8px; box-sizing: border-box; min-height: 52px; padding: 0 12px; border: 1px solid var(--c-line, #cfc3b4); border-radius: 14px; background: #fff; font: inherit; font-size: 1rem; color: inherit; white-space: nowrap; cursor: pointer; }
.sbk-cc__face::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; }
.sbk-cc__face:focus-visible { outline: 3px solid var(--c-focus, #5a4739); outline-offset: 1px; }
.sbk-cc__flag { font-size: 1.5rem; line-height: 1; }
.sbk-cc__flag, .sbk-pick__flag { font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif; }

/* Buscador de país y código (se abre bajo el campo de WhatsApp) */
.sbk-pick { position: absolute; z-index: 6; left: 0; right: 0; top: 100%; margin-top: 4px; overflow: hidden; border: 1px solid var(--c-line, #cfc3b4); border-radius: 14px; background: #fff; box-shadow: 0 12px 28px rgba(59, 51, 45, .16); }
.sbk-pick[hidden] { display: none; }
.sbk-f .sbk-pick__q { display: block; box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--c-line, #e6dccf); border-radius: 0; background: #fff; font: inherit; font-size: 1rem; }
.sbk-f .sbk-pick__q:focus-visible { outline: 3px solid var(--c-focus, #5a4739); outline-offset: -3px; }
.sbk-pick__list { max-height: min(300px, 45vh); margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.sbk-pick__list [role="option"] { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; cursor: pointer; }
.sbk-pick__list [role="option"]:hover, .sbk-pick__list [role="option"][aria-selected="true"] { background: var(--c-plum-soft, #e3eadf); }
.sbk-pick__flag { flex: none; font-size: 1.375rem; line-height: 1; }
.sbk-pick__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbk-pick__dial { flex: none; color: var(--c-muted, #6b5f55); font-variant-numeric: tabular-nums; }
.sbk-pick__list [data-current] .sbk-pick__name { font-weight: 700; }
.sbk-pick__head { padding: 8px 10px 4px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-muted, #6b5f55); }
.sbk-pick__note { padding: 8px 10px; font-size: .8125rem; color: var(--c-muted, #6b5f55); }
.sbk-phone input { flex: 1; min-width: 0; }
.sbk-cc--wide { position: relative; display: block; }
.sbk-cc--wide select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif; font-size: 1rem; }
.sbk-cc--wide:focus-within .sbk-cc__face { outline: 3px solid var(--c-focus, #5a4739); outline-offset: 1px; }
.sbk-cc--wide .sbk-cc__face { width: 100%; }
.sbk-cc--wide .sbk-cc__face::after { margin-left: auto; }
.sbk-cc__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sbk-cc:has(select[aria-invalid="true"]) .sbk-cc__face { border-color: var(--c-danger, #b42318); box-shadow: 0 0 0 1px var(--c-danger, #b42318); }

/* Sexo: opciones en píldoras (los círculos nativos quedan sobre cada píldora, invisibles, para teclado y lector de pantalla) */
.sbk-fs { margin: 0; padding: 0; border: 0; min-width: 0; }
.sbk-fs legend { padding: 0; margin: 0 0 8px; font-size: .9375rem; font-weight: 600; }
.sbk-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.sbk-seg__opt { position: relative; flex: 1 1 auto; margin: 0; cursor: pointer; }
.sbk-seg__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sbk-seg__opt span { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 52px; padding: 0 16px; border: 1px solid var(--c-line, #cfc3b4); border-radius: 14px; background: #fff; font-size: 1rem; text-align: center; }
.sbk-seg__opt input:checked + span { border-color: var(--c-primary, #6f5a4a); background: var(--c-primary, #6f5a4a); color: #fff; font-weight: 600; }
.sbk-seg__opt input:focus-visible + span { outline: 3px solid var(--c-focus, #5a4739); outline-offset: 1px; }
.sbk-seg:has(input[aria-invalid="true"]) .sbk-seg__opt span { border-color: var(--c-danger, #b42318); box-shadow: 0 0 0 1px var(--c-danger, #b42318); }
.sbk-f input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.sbk-f input[type="number"]::-webkit-outer-spin-button, .sbk-f input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.sbk-beca__msg { min-height: 1.25rem; margin: 0; font-size: .9375rem; color: var(--c-muted, #6b5f55); }
.sbk-beca__msg.is-error { color: var(--c-danger, #b42318); font-weight: 500; }
.sbk-step .btn, .sbk-step .sbk-beca__btn--own, .sbk-step .sbk-beca__btn--solid { margin: 0; }

/* Confirmación */
.sbk-step--done { justify-items: center; text-align: center; padding-top: 12vh; }
.sbk-done__mark { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--c-plum-soft, #e3eadf); color: var(--c-sage-ink, #3f5a3a); }
.sbk-done__mark .sbk-i { width: 36px; height: 36px; }
.sbk-step--done .sbk-beca__text { margin: 0; }
.sbk-step--done .btn, .sbk-step--done .sbk-beca__btn--solid { width: 100%; max-width: 360px; }
.sbk-beca__ok { margin: 10px 0 0; font-weight: 500; color: var(--c-sage-ink, #3f5a3a); }

.sbk-beca__btn:focus-visible, .sbk-modal__icon:focus-visible, .sbk-beca__send:focus-visible, .sbk-beca__ghost:focus-visible { outline: 3px solid var(--c-focus, #5a4739); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sbk-modal__meter span { transition: none; } }
@media (min-width: 720px) { .sbk-modal__body { padding-top: 36px; } .sbk-modal__title { font-size: 1.75rem; } }
