/* Generador de códigos QR — Virtual Bit (usa también styles_index.css) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.qr-hero { background: var(--gradient); color: #fff; padding: calc(var(--header-h) + 3rem) 2rem 7rem; position: relative; text-align: center; }
.qr-hero-inner { max-width: 820px; margin: 0 auto; }
.qr-hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.1; margin-bottom: 1rem; }
.qr-hero h1 span { color: var(--vb-turquoise); }
.qr-hero .rv-lead { margin: 0 auto 1.25rem; }
.qr-hero .rv-crumbs { text-align: center; }
.qr-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.qr-pills li { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.9rem; color: #D7E2F1; }

.qr-tool { padding: 0 2rem 4.5rem; background: var(--light); }
.qr-layout { max-width: 1200px; margin: -4.5rem auto 0; position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.qr-panel { background: #fff; border-radius: 24px; box-shadow: 0 20px 50px rgba(11, 45, 91, 0.12); padding: 2rem 2rem 1.5rem; }
.qr-paso + .qr-paso { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid #E3EAF3; }
.qr-paso h2 { font-size: 1.2rem; color: var(--vb-deep); display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem; }
.qr-paso h2 span { width: 2rem; height: 2rem; border-radius: 50%; background: var(--vb-deep); color: #fff; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; flex: none; }

.qr-tipos { border: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.qr-tipo { position: relative; cursor: pointer; }
.qr-tipo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qr-tipo > span { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; text-align: center; padding: 0.7rem 0.3rem; border: 1.5px solid #DDE5EF; border-radius: 14px; font-size: 0.85rem; font-weight: 600; color: var(--vb-deep); background: #fff; transition: border-color 0.2s ease, background 0.2s ease; }
.qr-tipo > span > span { font-size: 1.35rem; line-height: 1; }
.qr-tipo:hover > span { border-color: #B9C6DD; }
.qr-tipo input:checked + span { border-color: var(--vb-turquoise); background: rgba(0, 200, 150, 0.1); box-shadow: inset 0 0 0 1px var(--vb-turquoise); }
.qr-tipo input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }

.qr-grupo { border: 0; }
.qr-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; }
.qr-campo { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.qr-campo.is-full { grid-column: 1 / -1; }
.qr-campo label { font-size: 0.88rem; font-weight: 600; color: var(--vb-deep); }
.qr-campo input[type="text"], .qr-campo input[type="url"], .qr-campo input[type="tel"], .qr-campo input[type="email"], .qr-campo input[type="datetime-local"], .qr-campo select, .qr-campo textarea {
    width: 100%; font: inherit; font-size: 1rem; color: var(--vb-deep); background: #fff;
    border: 1.5px solid #DDE5EF; border-radius: 10px; padding: 0.6rem 0.75rem;
}
.qr-campo textarea { resize: vertical; }
.qr-campo input:focus, .qr-campo select:focus, .qr-campo textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 170, 239, 0.18); }
.qr-campo input:disabled { background: #F3F6FA; color: #9AA9BF; }
.qr-campo input[type="file"] { font-size: 0.9rem; color: var(--text-muted); }
.qr-ayuda { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.qr-checks { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.qr-check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500 !important; cursor: pointer; }
.qr-check input { width: 18px; height: 18px; accent-color: var(--vb-deep); }
.qr-color { flex-direction: row; align-items: center; justify-content: space-between; border: 1.5px solid #DDE5EF; border-radius: 10px; padding: 0.4rem 0.5rem 0.4rem 0.75rem; }
.qr-color input { width: 44px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.qr-link { background: none; border: 0; padding: 0; font: inherit; color: var(--secondary); font-weight: 600; text-decoration: underline; cursor: pointer; }

.qr-preview { position: sticky; top: calc(var(--header-h) + 1rem); }
.qr-preview-box { background: #fff; border-radius: 24px; box-shadow: 0 20px 50px rgba(11, 45, 91, 0.12); padding: 1.5rem; }
.qr-canvas { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; border-radius: 14px; border: 1px solid #E3EAF3; background: #fff; }
.qr-canvas.is-vacio { opacity: 0.25; }
.qr-estado { margin: 1rem 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--text-muted); text-align: center; }
.qr-estado.is-ok { color: #007A5E; }
.qr-estado.is-aviso { color: #8A5300; }
.qr-estado.is-error { color: #B42318; font-weight: 600; }
.qr-descargas { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.1rem; }
.qr-btn, .qr-btn-sec {
    font: inherit; font-weight: 700; font-size: 0.95rem; border-radius: 12px; padding: 0.75rem 0.9rem; cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease; min-height: 46px;
}
.qr-btn { grid-column: 1 / -1; background: var(--vb-turquoise); color: var(--vb-deep); border: 0; font-size: 1.02rem; }
.qr-btn:hover { background: #2ED8AE; }
.qr-btn-sec { background: #fff; color: var(--vb-deep); border: 2px solid var(--vb-deep); }
.qr-btn-sec:hover { background: var(--vb-deep); color: #fff; }
.qr-btn:disabled, .qr-btn-sec:disabled { opacity: 0.45; cursor: not-allowed; }
.qr-btn:focus-visible, .qr-btn-sec:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.qr-raw { margin-top: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.qr-raw summary { cursor: pointer; font-weight: 600; }
.qr-raw pre { margin: 0.5rem 0; white-space: pre-wrap; word-break: break-all; background: var(--light); border-radius: 10px; padding: 0.6rem 0.75rem; font-size: 0.8rem; color: var(--vb-deep); max-height: 160px; overflow: auto; }
.qr-print { display: none; }

/* Sección en el inicio */
@media (max-width: 1024px) {
    .qr-layout { grid-template-columns: 1fr; }
    .qr-preview { position: static; }
    .qr-tipos { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 640px) {
    .qr-hero { padding: calc(var(--header-h) + 2rem) 1.25rem 6rem; }
    .qr-tool { padding: 0 0.75rem 3rem; }
    .qr-panel { padding: 1.4rem 1.1rem 1.2rem; border-radius: 20px; }
    .qr-tipos { grid-template-columns: repeat(3, 1fr); }
    .qr-campos { grid-template-columns: 1fr; }
    .qr-preview-box { padding: 1.1rem; border-radius: 20px; }
    .qr-descargas { grid-template-columns: 1fr; }
}

/* Imprimir: solo la tarjeta */
@media print {
    body > *:not(.qr-print) { display: none !important; }
    .qr-print { display: block !important; width: 100%; max-width: 12cm; margin: 0 auto; }
    @page { margin: 1.5cm; }
}

/* En celular y tableta la vista previa queda debajo: atajo para llegar a ella */
.qr-ir { display: none; }
@media (max-width: 1024px) {
    .qr-ir { display: block; margin-top: 1.25rem; text-align: center; background: var(--vb-deep); color: #fff; font-weight: 700; text-decoration: none; padding: 0.8rem 1rem; border-radius: 12px; }
    .qr-ir:hover { background: #0A3A73; color: #fff; }
    .qr-preview { scroll-margin-top: calc(var(--header-h) + 0.5rem); }
}

/* Marca de Virtual Bit y pago para quitarla */
.qr-pago { border: 2px solid rgba(0, 200, 150, 0.45); background: rgba(0, 200, 150, 0.06); border-radius: 16px; padding: 1rem 1.1rem; gap: 0.55rem; }
.qr-pago.is-pagado { border-color: var(--vb-turquoise); background: rgba(0, 200, 150, 0.14); }
.qr-pago-tit { font-family: var(--font-title); font-weight: 800; color: var(--vb-deep); margin: 0 0 0.2rem; }
.qr-pago-txt { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 0.75rem; }
.qr-btn-pago { width: 100%; font: inherit; font-weight: 800; font-size: 1rem; border: 0; border-radius: 12px; padding: 0.8rem 1rem; background: var(--vb-deep); color: #fff; cursor: pointer; margin-bottom: 0.5rem; min-height: 48px; }
.qr-btn-pago:hover { background: #0A3A73; }
.qr-btn-pago:disabled { opacity: 0.5; cursor: not-allowed; }
.qr-btn-pago:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.qr-ayuda a { color: var(--secondary); }
.qr-ya-pague { margin-top: 0.6rem; font-size: 0.88rem; }
.qr-ya-pague summary { cursor: pointer; font-weight: 600; color: var(--secondary); }
.qr-ref-row { display: flex; gap: 0.5rem; margin: 0.6rem 0 0.3rem; }
.qr-ref-row input { flex: 1; min-width: 0; font: inherit; font-size: 0.95rem; text-transform: uppercase; border: 1.5px solid #DDE5EF; border-radius: 10px; padding: 0.5rem 0.7rem; color: var(--vb-deep); }
.qr-ref-row .qr-btn-sec { min-height: 0; padding: 0.5rem 0.9rem; }
.qr-pago-msg { margin: 0.5rem 0 0; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.qr-pago-msg.is-ok { color: #007A5E; }
.qr-pago-msg.is-aviso { color: #8A5300; }
.qr-pago-msg.is-error { color: #B42318; }
.qr-pago .qr-ayuda { display: block; line-height: 1.45; }
