/* Galeria de imagens (lightbox) do Adota RV — estilos do componente próprio. */

.fancybox-lock { overflow: hidden; }

.pets-fancybox { position: fixed; inset: 0; z-index: 1095; display: none; color: #fff; }
.pets-fancybox.is-open { display: block; }

.pets-fancybox__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 12, 18, .96);
  backdrop-filter: blur(8px);
}

.pets-fancybox__dialog {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
}

/* ------------------------------- Toolbar -------------------------------- */
.pets-fancybox__toolbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem 1.1rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent);
}
.pets-fancybox__counter { font-weight: 800; font-size: .95rem; letter-spacing: .02em; }
.pets-fancybox__tools { display: flex; align-items: center; gap: .4rem; }

.pets-fancybox__button,
.pets-fancybox__nav {
  border: 0; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, .12);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease, opacity .2s ease;
}
.pets-fancybox__button:hover,
.pets-fancybox__nav:hover { background: rgba(255, 255, 255, .26); transform: scale(1.06); }
.pets-fancybox__button:focus-visible,
.pets-fancybox__nav:focus-visible,
.pets-fancybox__thumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.pets-fancybox__button { width: 2.6rem; height: 2.6rem; border-radius: 999px; }
.pets-fancybox__button.is-active { background: rgba(244, 123, 107, .9); }

.pets-fancybox__button svg,
.pets-fancybox__nav svg {
  width: 1.35rem; height: 1.35rem;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------ Navegação ------------------------------- */
.pets-fancybox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2; width: 3.1rem; height: 3.1rem; border-radius: 999px;
}
.pets-fancybox__nav:hover { transform: translateY(-50%) scale(1.06); }
.pets-fancybox__nav svg { width: 1.7rem; height: 1.7rem; }
.pets-fancybox__nav--prev { left: 1rem; }
.pets-fancybox__nav--next { right: 1rem; }

/* -------------------------------- Palco --------------------------------- */
.pets-fancybox__figure {
  position: relative; flex: 1; min-height: 0; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .5rem 4.5rem 1rem;
}
.pets-fancybox__stage {
  display: flex; align-items: center; justify-content: center;
  max-width: 100%; max-height: 100%; overflow: hidden;
  cursor: zoom-in;
}
.pets-fancybox__stage.is-zoomed { cursor: grab; }
.pets-fancybox__stage.is-zoomed:active { cursor: grabbing; }

.pets-fancybox__image {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: .5rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .2s ease, transform .15s ease;
  will-change: transform;
}
.pets-fancybox__image.is-ready { opacity: 1; }
.pets-fancybox__stage.is-zoomed .pets-fancybox__image { transition: none; }

.pets-fancybox__caption {
  position: absolute; left: 50%; bottom: .35rem; transform: translateX(-50%);
  max-width: min(90%, 60rem); margin: 0;
  padding: .5rem .9rem; border-radius: 999px;
  background: rgba(0, 0, 0, .55); text-align: center; font-size: .9rem;
}
.pets-fancybox__loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: rgba(255, 255, 255, .75);
}

/* ----------------------------- Miniaturas ------------------------------- */
.pets-fancybox__thumbs {
  position: relative; z-index: 3;
  display: flex; gap: .5rem; padding: .75rem 1rem 1rem;
  overflow-x: auto; justify-content: center; scrollbar-width: thin;
  background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
}
.pets-fancybox__thumbs::-webkit-scrollbar { height: 6px; }
.pets-fancybox__thumbs::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .3); border-radius: 999px; }
.pets-fancybox.is-thumbs-hidden .pets-fancybox__thumbs { display: none; }

.pets-fancybox__thumb {
  flex: 0 0 auto; width: 4.5rem; height: 3.25rem;
  border: 2px solid transparent; border-radius: .5rem; padding: 0; cursor: pointer;
  background-color: rgba(255, 255, 255, .08);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: .55; transition: opacity .2s ease, border-color .2s ease, transform .2s ease;
}
.pets-fancybox__thumb:hover { opacity: .85; transform: translateY(-2px); }
.pets-fancybox__thumb.is-active { opacity: 1; border-color: #f47b6b; }

/* ----------------------------- Responsivo ------------------------------- */
@media (max-width: 767.98px) {
  .pets-fancybox__toolbar { padding: .6rem .7rem; }
  .pets-fancybox__button { width: 2.3rem; height: 2.3rem; }
  .pets-fancybox__button svg { width: 1.2rem; height: 1.2rem; }
  .pets-fancybox__figure { padding: .5rem 3.25rem 1rem; }
  .pets-fancybox__nav { width: 2.5rem; height: 2.5rem; }
  .pets-fancybox__nav svg { width: 1.35rem; height: 1.35rem; }
  .pets-fancybox__nav--prev { left: .4rem; }
  .pets-fancybox__nav--next { right: .4rem; }
  .pets-fancybox__thumb { width: 3.5rem; height: 2.5rem; }
  .pets-fancybox__caption { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pets-fancybox__image,
  .pets-fancybox__button,
  .pets-fancybox__nav,
  .pets-fancybox__thumb { transition: none; }
}
