/* =============================================================================
   reservas-accesos.js: un solo botón para los otros portales + aviso flotante del paso 3
   ============================================================================= */

/* ---------------------------------------------------------------- botón único «Grupos, empresas o por horas» */
/* Un solo botón centrado. El grupo del pie (escritorio) y el de móvil siguen mostrándose u ocultándose
   como siempre (reservas-polish.css): aquí solo se cambia cómo se ven, no cuándo. */
html body .corp-switch-group:has(.acc-more) { justify-content: center !important; gap: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
/* En móvil, reservas-polish.css ponía los dos accesos en dos columnas (con un id): se gana con :not(#_). */
@media (max-width: 899px) {
    html:not(#_) body:not(#_) .corp-switch-group--mobile:has(.acc-more) { display: flex !important; grid-template-columns: none !important; align-items: center !important; width: 100%; }
}
.acc-more { position: relative; display: inline-flex; max-width: 100%; }
.acc-more__btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 8px 14px;
    border: 1px solid rgba(var(--hotel-primary-rgb, 13, 50, 38), .22); border-radius: var(--ux-pill, 999px); background: #ffffff;
    color: var(--hotel-primary, #0d3226); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.acc-more__btn:hover, .acc-more.is-open .acc-more__btn { border-color: var(--hotel-primary, #0d3226); box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .25); }
.acc-more__btn:focus-visible { outline: 2px solid var(--hotel-primary, #0d3226); outline-offset: 2px; }
.acc-more__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-more__chev { width: 16px; height: 16px; flex: 0 0 auto; transition: transform .2s ease; }
.acc-more.is-open .acc-more__chev { transform: rotate(180deg); }
.acc-more--up .acc-more__chev { transform: rotate(180deg); }
.acc-more--up.is-open .acc-more__chev { transform: none; }

.acc-more__menu {
    position: absolute; left: 50%; top: calc(100% + 8px); z-index: 60; width: max-content; max-width: min(340px, calc(100vw - 32px));
    display: flex; flex-direction: column; padding: 6px; border-radius: var(--ux-radius, 12px); background: #ffffff;
    border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35);
    opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.acc-more--up .acc-more__menu { top: auto; bottom: calc(100% + 8px); transform: translate(-50%, 4px); }
.acc-more.is-open .acc-more__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .18s ease, transform .18s ease; }
html body .corp-switch-group a.corp-switch.acc-more__item {
    display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 2px; margin: 0 !important; padding: 10px 12px !important;
    border: 0 !important; border-radius: var(--ux-radius-sm, 8px) !important; background: none !important; text-align: center !important; text-decoration: none !important;
    color: #1f2623 !important; white-space: normal !important; width: auto !important;
}
html body .corp-switch-group a.corp-switch.acc-more__item:hover, html body .corp-switch-group a.corp-switch.acc-more__item:focus-visible { background: rgba(var(--hotel-primary-rgb, 13, 50, 38), .06) !important; }
.acc-more__item strong, .acc-more__item small { text-align: center; }
.acc-more__item strong { font-size: 14px; font-weight: 600; color: var(--hotel-primary, #0d3226); }
.acc-more__item small { font-size: 12.5px; color: #5f6b66; line-height: 1.35; }

/* ---------------------------------------------------------------- aviso «Incluido en tu reserva» */
/* El aviso fijo (paso 1 y paso 3) ya no ocupa sitio: se muestra flotando una vez al llegar al paso 3. */
html body .included-transfer { display: none !important; }
.acc-perk {
    position: fixed; left: 50%; z-index: 1002; width: min(520px, calc(100vw - 24px));
    display: flex; align-items: flex-start; gap: 12px; padding: 12px 40px 14px 14px; overflow: hidden;
    border-radius: var(--ux-radius, 12px); background: #ffffff; border: 1px solid rgba(var(--hotel-primary-rgb, 13, 50, 38), .18);
    box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .35);
    opacity: 0; transform: translate(-50%, -10px); transition: opacity .35s ease, transform .35s ease;
}
.acc-perk.is-on { opacity: 1; transform: translate(-50%, 0); }
.acc-perk__icon { width: 26px; height: 26px; flex: 0 0 auto; color: var(--hotel-accent-gold, #b79353); margin-top: 1px; }
.acc-perk p { margin: 0; font-size: 13.5px; line-height: 1.4; color: #3d4744; }
.acc-perk strong { display: block; margin-bottom: 2px; color: var(--hotel-primary, #0d3226); font-size: 14px; }
.acc-perk__close {
    position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none;
    color: #6b7672; font-size: 20px; line-height: 1; cursor: pointer;
}
.acc-perk__close:hover { background: rgba(0, 0, 0, .06); }
/* Barra de tiempo: se vacía en los 8 segundos que dura el aviso. */
.acc-perk__time { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--hotel-accent-gold, #b79353); transform-origin: left; }
.acc-perk.is-on .acc-perk__time { animation: accPerkTime 8s linear forwards; }
@keyframes accPerkTime { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
    .acc-perk, .acc-more__menu, .acc-more__chev { transition: none; }
    .acc-perk.is-on .acc-perk__time { animation: none; }
}

/* ---------------------------------------------------------------- botón de sonido de la cabecera */
/* feedback-movil.js lo crea al abrir la página en un teléfono (≤ 768 px), pero sus estilos solo valen por
   debajo de 900 px: si luego la ventana se agranda salía como botón gris del navegador con «Sonido activado».
   Aquí: siempre solo el icono, y en pantallas anchas no se muestra (tampoco se crea al abrir en ellas). */
html body .hotel-header .mx-sonido .mx-sonido__txt { display: none !important; }
@media (min-width: 900px) { html body .hotel-header .mx-sonido { display: none !important; } }

/* ---------------------------------------------------------------- botón de la guía por voz (reservas-voz.js) */
.voz-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 10px; margin-left: 6px;
    border: 1px solid rgba(var(--hotel-primary-rgb, 13, 50, 38), .22); border-radius: var(--ux-pill, 999px);
    background: transparent; color: var(--hotel-primary, #0d3226); cursor: pointer;
    font-family: inherit; font-size: 11.5px; font-weight: 600; line-height: 1; letter-spacing: .04em; text-transform: uppercase;
    transition: background-color .2s ease, border-color .2s ease;
}
.voz-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.voz-btn:hover { border-color: var(--hotel-primary, #0d3226); }
.voz-btn:focus-visible { outline: 2px solid var(--hotel-primary, #0d3226); outline-offset: 2px; }
/* Encendida: el altavoz «suena» (ondas) y el botón se marca; apagada: altavoz tachado. */
.voz-btn[aria-pressed="false"] .voz-btn__wave, .voz-btn[aria-pressed="false"] .voz-btn__wave2 { display: none; }
.voz-btn[aria-pressed="true"] .voz-btn__off { display: none; }
.voz-btn[aria-pressed="true"] { background: rgba(var(--hotel-primary-rgb, 13, 50, 38), .1); border-color: var(--hotel-primary, #0d3226); }
@media (max-width: 520px) { .voz-btn .voz-btn__txt { display: none; } .voz-btn { padding: 5px 8px; } }

/* Idioma de la voz. Solo aparece cuando hay más de dos grabados: con español e inglés el
   portal ya tiene su propio conmutador y dos controles de idioma seguidos no se entienden.
   Va pegado al botón, con el mismo aire, para que se lea como una sola pieza. */
.voz-idioma {
    min-height: 34px; margin-left: 4px; padding: 5px 24px 5px 9px;
    border: 1px solid rgba(var(--hotel-primary-rgb, 13, 50, 38), .22); border-radius: var(--ux-pill, 999px);
    background: transparent; color: var(--hotel-primary, #0d3226); cursor: pointer;
    font-family: inherit; font-size: 11.5px; font-weight: 600; line-height: 1;
    -webkit-appearance: none; appearance: none;
    /* La flechita se dibuja aquí: el select del sistema la pone de un color que no es el del hotel. */
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%;
    background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.voz-idioma:hover { border-color: var(--hotel-primary, #0d3226); }
.voz-idioma:focus-visible { outline: 2px solid var(--hotel-primary, #0d3226); outline-offset: 2px; }
.voz-idioma option { color: #1f2623; background: #fff; }

/* ---------------------------------------------------------------- la voz, preguntada
   Antes la guía por voz se encendía sola a quien entraba desde el propio sitio. Que una
   página empiece a hablarte sin haberlo pedido es agresivo, y en un teléfono con el
   altavoz alto, incómodo. Ahora se pregunta una vez, abajo y sin tapar el formulario,
   con el «no» tan a mano como el «sí». */
.voz-pide {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translate(-50%, 14px);
    z-index: 2147482000;              /* por debajo del chat, por encima de la página */
    width: min(420px, calc(100vw - 24px));
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .35);
    font: 400 14px/1.5 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1f2937;
    opacity: 0;
    transition: opacity .28s ease, transform .28s ease;
}
.voz-pide--dentro { opacity: 1; transform: translate(-50%, 0); }
.voz-pide__alto { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.voz-pide__logo { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; border-radius: 8px; }
.voz-pide__alto b { display: block; font-weight: 600; font-size: 14px; color: #0f172a; }
.voz-pide__alto small { display: block; color: #64748b; font-size: 12.5px; line-height: 1.45; }
.voz-pide p { margin: 0 0 12px; color: #334155; }
.voz-pide__b { display: flex; gap: 8px; justify-content: flex-end; }
.voz-pide__b button {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font: 600 13px/1 inherit;
    cursor: pointer;
}
/* El «sí» destaca, pero el «no» no se esconde: los dos se leen y los dos se tocan igual. */
.voz-pide__b [data-voz-si] {
    background: var(--hotel-primary, #0d3226);
    border-color: var(--hotel-primary, #0d3226);
    color: #fff;
}
/* Los idiomas pueden ser ocho: se reparten en las líneas que hagan falta. */
.voz-pide__b--idiomas { flex-wrap: wrap; justify-content: flex-start; }
.voz-pide__b--idiomas button[aria-pressed="true"] {
    border-color: var(--hotel-primary, #0d3226);
    color: var(--hotel-primary, #0d3226);
}
@media (prefers-reduced-motion: reduce) {
    .voz-pide { transition: none; opacity: 1; transform: translate(-50%, 0); }
}
