/* ==========================================================================
   Archive stylesheet — self-contained offline copy of an Allegro Lokalnie
   offer page. Reproduces the interactive behaviour that the original site
   handled with third-party JavaScript, without any tracking.
   ========================================================================== */

/* --- CSS-only photo gallery (replaces the original JS carousel) ----------- */
.arch-gallery {
  position: relative;
}
.arch-gallery__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.arch-gallery__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 20rem;
}
.arch-gallery__slide {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.arch-gallery__slide .photo-carousel-photo-preview__image {
  display: block;
  max-width: 100%;
  max-height: min(36rem, 60vh);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* --- Prev/next arrows on the main stage (original used slick-arrow) ------- */
.arch-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6.4rem;
  width: 6.4rem;
  background-color: hsla(0, 0%, 97%, .65);
  background-image: url(../f/34929db4fa508be884c4.svg);
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 2.4rem 2.4rem;
  border: 1px solid #484848;
  border-radius: 2px;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  z-index: 2;
  opacity: .85;
  transition: opacity .2s ease;
}
.arch-gallery__nav:hover {
  opacity: 1;
}
.arch-gallery__nav--prev {
  left: 0;
}
.arch-gallery__nav--next {
  right: 0;
  transform: translateY(-50%) rotate(180deg);
}
#arch-ph-0:checked ~ .arch-gallery__stage .arch-gallery__slide--0,
#arch-ph-1:checked ~ .arch-gallery__stage .arch-gallery__slide--1,
#arch-ph-2:checked ~ .arch-gallery__stage .arch-gallery__slide--2 {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}
.arch-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin: 2rem 0 0.4rem;
  padding: 0;
  list-style: none;
  overflow: visible;
  white-space: normal;
}
.arch-gallery__thumb {
  margin: 0;
}
.arch-gallery__thumb label {
  display: inline-block;
  cursor: pointer;
  outline-offset: 2px;
}
.arch-gallery__thumb .photo-carousel__thumbnail-link {
  display: block;
  width: 7.2rem;
  height: 7.2rem;
  border: 0.2rem solid #aaa;
  border-radius: 0.8rem;
  padding: 0.1rem;
  object-fit: cover;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.arch-gallery__thumb label:hover .photo-carousel__thumbnail-link {
  border-color: #7770bd;
}
#arch-ph-0:checked ~ .arch-gallery__thumbs .arch-gallery__thumb--0 .photo-carousel__thumbnail-link,
#arch-ph-1:checked ~ .arch-gallery__thumbs .arch-gallery__thumb--1 .photo-carousel__thumbnail-link,
#arch-ph-2:checked ~ .arch-gallery__thumbs .arch-gallery__thumb--2 .photo-carousel__thumbnail-link {
  border-color: #7770bd;
}

/* --- Fullscreen photo popup (lightbox) -----------------------------------
   Matches the "regular" (non-popup) gallery: white background, same
   translucent slick-style arrows — just blown up to fill the screen. ------ */
.arch-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.arch-lightbox--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .25s ease, visibility 0s linear 0s;
}
.arch-lightbox__img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  transition: opacity .18s ease;
}
.arch-lightbox__close {
  position: absolute;
  top: 12px;
  right: 20px;
  width: 48px;
  height: 48px;
  font-size: 28px;
  line-height: 1;
  color: #222;
  background: none;
  border: 0;
  cursor: pointer;
}
.arch-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6.4rem;
  width: 6.4rem;
  background-color: hsla(0, 0%, 97%, .65);
  background-image: url(../f/34929db4fa508be884c4.svg);
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 2.4rem 2.4rem;
  border: 1px solid #484848;
  border-radius: 2px;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  opacity: .85;
  transition: opacity .2s ease;
}
.arch-lightbox__nav:hover {
  opacity: 1;
}
.arch-lightbox__nav--prev {
  left: 12px;
}
.arch-lightbox__nav--next {
  right: 12px;
  transform: translateY(-50%) rotate(180deg);
}

/* --- Follow ("Obserwuj") button ------------------------------------------- */
.mlc-follow-button-form {
  display: inline-flex;
}
.mlc-follow-button-form__noscript-submit {
  font-size: 12px;
}

/* --- "Smart" info tooltip -------------------------------------------------- */
.arch-smart-info {
  position: relative;
  display: inline-flex;
}
.arch-smart-info__popup {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  width: max-content;
  max-width: 324px;
  z-index: 100;
}
.arch-smart-info__popup[hidden] {
  display: none;
}
/* Bridges the gap between the trigger and the popup so the pointer never
   "leaves" the hoverable area while travelling down to the popup. */
.arch-smart-info__popup::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.mlc-smart-info-icon__tooltip-link {
  display: inline-block;
  margin-top: 4px;
  color: #0fb91b;
  text-decoration: none;
}
.mlc-smart-info-icon__tooltip-link:hover,
.mlc-smart-info-icon__tooltip-link:focus {
  text-decoration: underline;
}

/* --- "Might interest you" offers carousel: smooth scroll + snap --------- */
.ml-carousel__items {
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}
.ml-carousel__item {
  position: relative;
  scroll-snap-align: start;
}
.mlc-sp-offer-carousel__item__follow {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  background: hsla(0, 0%, 100%, .85);
  border-radius: 50%;
  box-shadow: 0 1px 3px hsla(0, 0%, 0%, .25);
}

/* --- Parameters "Więcej / Mniej" expander -------------------------------- */
.mlc-params--extended .mlc-params__expand-icon {
  transform: rotate(180deg);
}

/* --- Safety net: never show leftover JS skeleton placeholders ------------- */
.ml-skeleton {
  display: none !important;
}

/* --- Cookie consent modal -------------------------------------------------
   A centered dialog (not a bottom banner) — matches the real GDPR-consent
   popup: dimmed backdrop, white card, language picker, long-form notice,
   three actions (accept / reject / manage on the real cookie-settings page).
   ---------------------------------------------------------------------- */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  animation: cookie-modal-in 0.25s ease both;
}
.cookie-modal[hidden] {
  display: none;
}
@keyframes cookie-modal-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cookie-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}
.cookie-modal__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.cookie-modal__lang-select {
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px 6px;
  color: #333;
  background: #fff;
}
.cookie-modal__lang-label {
  font-size: 13px;
  color: #767676;
}
.cookie-modal__title {
  font-size: 21px;
  font-weight: 700;
  color: #222;
  margin: 0 0 12px;
}
.cookie-modal__body {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}
.cookie-modal__body p {
  margin: 0 0 12px;
}
.cookie-modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.cookie-modal__links a,
.cookie-modal__body a {
  color: #7770bd;
}
.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.cookie-modal__btn {
  min-width: 140px;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid #7770bd;
  transition: background 0.15s ease, color 0.15s ease;
}
.cookie-modal__btn--accept {
  background: #7770bd;
  color: #fff;
}
.cookie-modal__btn--accept:hover {
  background: #635cae;
  border-color: #635cae;
}
.cookie-modal__btn--reject,
.cookie-modal__btn--manage {
  background: #fff;
  color: #7770bd;
}
.cookie-modal__btn--reject:hover,
.cookie-modal__btn--manage:hover {
  background: #f2f1fb;
}
@media (max-width: 640px) {
  .cookie-modal__actions,
  .cookie-modal__btn { width: 100%; }
}
