/*
 * fv2026 · «Conheça-nos» (js/fv-conheca.js, fv-conheca.tpl). Loaded only by footer.tpl when fv-config.tpl sets $fv_conheca.
 * Theme tokens, every class prefixed fvc-, everything position: fixed (no layout shift).
 * Stacking: the bubble at the level of «Voltar ao topo» (30), in the opposite corner, under the balloons (95-97);
 * the window (1030) over the balloons and the drawers (1000), under the Bootstrap modals of cookiesplus (1040-1050).
 * Hidden while the dafnesearch layer is open (html.ba-abierta).
 */
.fvc-root [hidden] { display: none !important; }
/* No double-tap zoom on phones (tapping the viewer arrows quickly zoomed the page in) */
.fvc-root button, .fvc-visor, .fvc-fotos { touch-action: manipulation; }
html.ba-abierta .fvc-root { display: none !important; }
html.fvc-abierta { overflow: hidden; }

/* 1. Bubble ------------------------------------------------------------------------------- */
.fvc-bolha {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  opacity: 0; transform: translateY(18px); transition: opacity .35s ease-out, transform .35s ease-out;
}
.fvc-bolha.fvc-entra { opacity: 1; transform: none; }
.fvc-bolha-abre {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 5px 20px 5px 5px; border: 1px solid var(--fv-linea);
  border-radius: 999px; background: #fff; color: var(--fv-tinta); box-shadow: var(--fv-sombra-capa); font: inherit; text-align: left;
  cursor: pointer; transition: border-color .15s, transform .15s;
}
.fvc-bolha-abre:hover { border-color: var(--fv-verde); transform: translateY(-2px); }
.fvc-bolha-abre:focus-visible { outline: 3px solid var(--fv-verde); outline-offset: 3px; }
.fvc-bolha-foto { position: relative; flex: none; width: 54px; height: 54px; }
.fvc-bolha-foto img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--fv-verde); }
/* A ring that spreads out three times when the bubble arrives */
.fvc-bolha-foto::after {
  content: ''; position: absolute; inset: -4px; border: 2px solid var(--fv-verde); border-radius: 50%; opacity: 0; pointer-events: none;
}
.fvc-entra .fvc-bolha-foto::after { animation: fvc-pulso 2.2s ease-out .6s 3; }
@keyframes fvc-pulso { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45); } }
.fvc-bolha-texto { display: flex; flex-direction: column; line-height: 1.2; }
.fvc-bolha-texto strong { font: 600 16px/1.2 var(--fv-titulos); }
.fvc-bolha-texto span { margin-top: 2px; font-size: 13px; color: var(--fv-gris); }
/* Opened once: only the picture (the name stays for screen readers) */
.fvc-compacta .fvc-bolha-abre { padding: 5px; }
.fvc-compacta .fvc-bolha-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fvc-bolha-fecha {
  position: absolute; top: -8px; right: -8px; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  margin: 0; padding: 0; border: 1px solid var(--fv-linea); border-radius: 50%; background: #fff; color: var(--fv-gris); box-shadow: var(--fv-sombra-suave); cursor: pointer;
}
.fvc-bolha-fecha::before { content: ''; position: absolute; inset: -9px; } /* larger tap area */
.fvc-bolha-fecha:hover { color: var(--fv-tinta); border-color: var(--fv-borde); }
/* «Tem a certeza?» above the bubble, before hiding it */
.fvc-confirma {
  position: absolute; left: 0; bottom: calc(100% + 12px); width: 280px; max-width: calc(100vw - 24px); padding: 14px 16px 16px;
  border: 1px solid var(--fv-linea); border-radius: var(--fv-r-l); background: #fff; box-shadow: var(--fv-sombra-capa);
  animation: fvc-aparece .18s ease-out;
}
.fvc-confirma p { margin: 0 0 12px; font-size: 14px; line-height: 1.4; color: var(--fv-texto); }
.fvc-confirma p strong { display: block; margin-bottom: 2px; font-size: 15px; color: var(--fv-tinta); }
.fvc-confirma-botoes { display: flex; gap: 8px; }
.fvc-confirma-botoes .fv-btn { flex: 1 1 0; min-height: 40px; padding: 0 12px; font-size: 14px; }

/* 2. Window ------------------------------------------------------------------------------- */
.fvc-dialogo {
  position: fixed; inset: 0; z-index: 1030; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(20, 35, 26, .62); overscroll-behavior: contain;
}
.fvc-panel {
  position: relative; width: min(880px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto;
  overscroll-behavior: contain; background: #fff; border-radius: var(--fv-r-xl); box-shadow: var(--fv-sombra-capa); animation: fvc-aparece .25s ease-out;
}
@keyframes fvc-aparece { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.fvc-cab {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 24px 12px; background: #fff;
}
.fvc-cab h2 { margin: 6px 0 0; font-size: 22px; line-height: 1.25; }
.fvc-fecha {
  flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 -8px 0 0; padding: 0;
  border: 1px solid var(--fv-linea); border-radius: 50%; background: #fff; color: var(--fv-tinta); cursor: pointer;
}
.fvc-fecha:hover { border-color: var(--fv-verde); color: var(--fv-verde); }
.fvc-corpo { padding: 0 24px 24px; }
.fvc-entrada { margin: 0 0 16px; font-size: 16px; color: var(--fv-gris); }

.fvc-video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--fv-r-l); background: #000; }
.fvc-video video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.fvc-som {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 0; border-radius: 999px; background: rgba(0, 0, 0, .66); color: #fff; font: 600 14px/1 var(--fv-sans); cursor: pointer;
}
.fvc-som:hover { background: rgba(0, 0, 0, .82); }
.fvc-aviso { margin: 10px 0 0; font-size: 13px; color: var(--fv-gris); }

.fvc-sub { margin: 24px 0 10px; font-size: 17px; }
.fvc-fotos {
  display: flex; gap: 10px; margin: 0; padding: 0 0 8px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: thin;
}
.fvc-fotos li { flex: 0 0 auto; scroll-snap-align: start; }
.fvc-foto { display: block; margin: 0; padding: 0; border: 0; border-radius: var(--fv-r-m); overflow: hidden; background: var(--fv-linea-suave); cursor: zoom-in; }
.fvc-foto img { display: block; width: 180px; height: 120px; object-fit: cover; transition: transform .2s; }
.fvc-foto:hover img { transform: scale(1.05); }
.fvc-foto:focus-visible { outline: 3px solid var(--fv-verde); outline-offset: 2px; }

.fvc-pie {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--fv-linea);
}
.fvc-morada { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: var(--fv-texto); }
.fvc-morada svg { flex: none; color: var(--fv-verde); }
.fvc-enlaces { display: flex; flex-wrap: wrap; gap: 10px; }

/* 3. Photo viewer (over the window) ------------------------------------------------------- */
.fvc-visor { position: fixed; inset: 0; z-index: 1035; display: flex; align-items: center; justify-content: center; background: rgba(8, 12, 10, .97); }
.fvc-visor img { max-width: calc(100vw - 144px); max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); border-radius: var(--fv-r-m); object-fit: contain; }
.fvc-visor-btn {
  position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer;
}
.fvc-visor-btn:hover { background: rgba(255, 255, 255, .26); }
.fvc-visor-fecha { top: 16px; right: 16px; }
.fvc-visor-ant { top: 50%; left: 16px; transform: translateY(-50%); }
.fvc-visor-seg { top: 50%; right: 16px; transform: translateY(-50%); }
.fvc-visor-n { position: absolute; bottom: 18px; left: 50%; margin: 0; transform: translateX(-50%); font-size: 14px; color: #fff; }

/* 4. Phones ------------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .fvc-bolha { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  /* Product page: over the fixed buying bar, like «Voltar ao topo» (product.css) */
  #product .fvc-bolha { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .fvc-bolha-foto { width: 48px; height: 48px; }
  .fvc-bolha-abre { gap: 10px; padding-right: 16px; }
  .fvc-bolha-texto strong { font-size: 15px; }

  .fvc-dialogo { align-items: flex-end; padding: 0; }
  .fvc-panel {
    width: 100%; max-height: 94vh; max-height: 94dvh; padding-bottom: env(safe-area-inset-bottom, 0px);
    border-radius: var(--fv-r-xl) var(--fv-r-xl) 0 0; animation-name: fvc-sube;
  }
  @keyframes fvc-sube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .fvc-cab { padding: 16px 16px 10px; }
  .fvc-cab h2 { margin-top: 4px; font-size: 19px; }
  .fvc-corpo { padding: 0 16px 20px; }
  .fvc-entrada { font-size: 15px; }
  .fvc-video { border-radius: var(--fv-r-m); }
  .fvc-foto img { width: 150px; height: 100px; }
  .fvc-enlaces, .fvc-enlaces .fv-btn { width: 100%; }

  .fvc-visor img { max-width: 100vw; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); border-radius: 0; }
  .fvc-visor-ant, .fvc-visor-seg { top: auto; bottom: 12px; transform: none; }
  .fvc-visor-n { bottom: 26px; }
}
