/* Shared components used by every variant: floating contact button (.kfab) and click-to-load map (.mapa).
   Each variant themes them through these custom properties (set them on :root or body). */
:root {
  --kfab-accent: #D91C00;
  --kfab-accent-fg: #fff;
  --kfab-ink: #1E2126;
  --kfab-muted: #5A6069;
  --kfab-surface: #fff;
  --kfab-line: #E3E5E8;
  --kfab-today: #B41600;
  --kfab-radius: 14px;
  --kfab-btn-radius: 10px;
  --kfab-border: 0 solid transparent;
  --kfab-shadow: 0 18px 50px rgba(15, 18, 24, .22);
  --kfab-bottom: 16px;            /* mobile: distance from the bottom edge (raise it above sticky bars) */
}

/* ---------- floating contact button ---------- */
.kfab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 85; color: var(--kfab-ink); }
.kfab > summary {
  list-style: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 12px; background: var(--kfab-accent); color: var(--kfab-accent-fg);
  border-radius: var(--kfab-radius) 0 0 var(--kfab-radius); border: var(--kfab-border); border-right: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.kfab > summary::-webkit-details-marker { display: none; }
.kfab > summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kfab-label { writing-mode: vertical-rl; transform: rotate(180deg); }
.kfab[open] > summary { filter: brightness(.92); }
.kfab-panel {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  width: 340px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px 22px 18px;
  background: var(--kfab-surface); color: var(--kfab-ink); border: var(--kfab-border);
  border-radius: var(--kfab-radius); box-shadow: var(--kfab-shadow); font-size: 15.5px; line-height: 1.45;
}
.kfab-title { margin: 0 0 2px; font-weight: 800; font-size: 18px; letter-spacing: 0; text-transform: none; }
.kfab-sub { margin: 0 0 12px; color: var(--kfab-muted); font-size: 14.5px; }
.kfab-status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 600; font-size: 14.5px; }
.kfab-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #9AA0A8; flex: none; }
.kfab-status.is-open::before { background: #1E9E4A; }
.kfab-status.is-closed::before { background: #D91C00; }
.kfab-actions { display: grid; gap: 8px; margin-bottom: 16px; }
.kfab-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 14px;
  border-radius: var(--kfab-btn-radius); font-weight: 700; text-decoration: none; border: 1.5px solid var(--kfab-line);
  color: var(--kfab-ink); background: var(--kfab-surface);
}
.kfab-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kfab-btn.is-primary { background: var(--kfab-accent); border-color: var(--kfab-accent); color: var(--kfab-accent-fg); }
.kfab-btn:hover { filter: brightness(.95); color: inherit; }
.kfab-btn.is-primary:hover { color: var(--kfab-accent-fg); }
.kfab-hours { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 12px; }
.kfab-hours th { text-align: left; font-weight: 500; padding: 5px 0; }
.kfab-hours td { text-align: right; padding: 5px 0; font-variant-numeric: tabular-nums; }
.kfab-hours tr + tr { border-top: 1px solid var(--kfab-line); }
.kfab-hours tr.is-today th, .kfab-hours tr.is-today td { color: var(--kfab-today); font-weight: 700; }
.kfab-people { margin: 0 0 10px; color: var(--kfab-muted); font-size: 14px; }
.kfab-more { font-weight: 700; color: var(--kfab-today); }
@media (max-width: 760px) {
  .kfab { top: auto; bottom: var(--kfab-bottom); right: 16px; transform: none; }
  .kfab > summary { width: 58px; height: 58px; padding: 0; justify-content: center; border-radius: 50%; border-right: var(--kfab-border); }
  .kfab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kfab-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(var(--kfab-bottom) + 70px); transform: none; width: auto; max-height: calc(100vh - var(--kfab-bottom) - 100px); }
}

/* ---------- click-to-load map ---------- */
.mapa {
  position: relative; min-height: 300px; display: grid; place-items: center; overflow: hidden;
  background-color: #EEF0EC;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .05) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px),
    linear-gradient(32deg, transparent 47%, rgba(255, 255, 255, .95) 47%, rgba(255, 255, 255, .95) 53%, transparent 53%),
    linear-gradient(-58deg, transparent 48%, rgba(255, 255, 255, .9) 48%, rgba(255, 255, 255, .9) 52%, transparent 52%);
  background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
}
.mapa.is-loaded { display: block; background: none; }
.mapa iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mapa-placeholder { position: relative; text-align: center; padding: 24px; max-width: 360px; }
.mapa-placeholder svg { width: 44px; height: 44px; fill: none; stroke: #D91C00; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mapa-placeholder p { margin: 6px 0 14px; font-weight: 700; }
.mapa-placeholder small { display: block; margin-top: 10px; font-size: 13px; color: #5A6069; }
