/* Piezas comunes a las webs de muestra de XPY wb: barra de muestra, idioma, diálogo y mapa ilustrado. */

/* Idioma: el texto existe en ambos idiomas y se muestra solo el activo */
html[lang="es"] [lang="en"],
html[lang="en"] [lang="es"] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Barra superior "muestra hecha por XPY wb" */
.xpy-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 4px 12px 4px 16px;
  background: #0C1519; color: #F3ECE6;
  font: 500 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  border-bottom: 1px solid rgba(207, 157, 123, .35);
}
.xpy-bar__info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.xpy-bar__info svg { width: 30px; height: auto; flex: none; color: #CF9D7B; }
.xpy-bar__info b { color: #CF9D7B; font-weight: 700; }
.xpy-bar__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.xpy-bar a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: 999px; color: inherit; text-decoration: none; white-space: nowrap;
}
.xpy-bar__back { border: 1px solid rgba(207, 157, 123, .35); }
.xpy-bar__cta { background: #CF9D7B; color: #0C1519 !important; font-weight: 700; }
.xpy-bar a:hover { filter: brightness(1.08); }
.xpy-bar a:focus-visible { outline: 2px solid #CF9D7B; outline-offset: 2px; }
@media (max-width: 560px) {
  .xpy-bar__long { display: none; }
  .xpy-bar__back span { display: none; }
}
@media (max-width: 400px) {
  .xpy-bar__info svg { display: none; }
}

/* Selector de idioma del negocio */
.lang-switch { display: inline-flex; border-radius: 999px; padding: 3px; gap: 2px; }
.lang-switch button {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 12px/1 system-ui, sans-serif; letter-spacing: .04em; background: transparent; color: inherit;
}
.lang-switch button[aria-pressed="true"] { background: var(--ls-on-bg, #111); color: var(--ls-on-fg, #fff); }
.lang-switch button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Marca del negocio: área táctil cómoda */
.brand { min-height: 44px; }

/* Diálogo que explica los botones ficticios */
.demo-dialog {
  width: min(420px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px;
  background: #0C1519; color: #F3ECE6; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  font: 400 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.demo-dialog::backdrop { background: rgba(8, 10, 12, .6); backdrop-filter: blur(3px); }
.demo-dialog__body { padding: 28px 24px 24px; }
.demo-dialog__tag {
  display: inline-block; margin-bottom: 12px; padding: 4px 8px; border-radius: 6px;
  background: rgba(207, 157, 123, .15); color: #CF9D7B; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.demo-dialog h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.2; }
.demo-dialog p { margin: 0 0 20px; color: #D6CEC7; }
.demo-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-dialog__actions a,
.demo-dialog__actions button {
  flex: 1 1 160px; display: inline-flex; justify-content: center; align-items: center; min-height: 48px;
  padding: 0 18px; border-radius: 999px; font: 700 15px/1 system-ui, sans-serif; cursor: pointer; text-decoration: none;
}
.demo-dialog__actions a { background: #CF9D7B; color: #0C1519; border: 0; }
.demo-dialog__actions button { background: transparent; color: #F3ECE6; border: 1px solid rgba(207, 157, 123, .4); }
.demo-dialog :focus-visible { outline: 2px solid #CF9D7B; outline-offset: 3px; }

/* Mapa ilustrado (sin coordenadas reales) */
.demo-map { position: relative; overflow: hidden; }
.demo-map svg { display: block; width: 100%; height: 100%; }
.demo-map__label {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  padding: 6px 12px; border-radius: 999px; font: 600 12px/1.2 system-ui, sans-serif; white-space: nowrap;
  background: rgba(255, 255, 255, .92); color: #222; box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

/* Créditos */
.demo-credits { font-size: 12px; opacity: .75; }
.demo-credits a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
