/* Reklam bileşeni responsive kısıtları */
.pgpt-reklam {
  max-width: 100%;
  margin-bottom: 10px;
}

/* Son reklam öğesinden sonra boşluk olmasın */
.pgpt-reklam:last-child {
  margin-bottom: 0;
  line-height: 0;
}
.pgpt-reklam, .pgpt-reklam * { box-sizing: border-box; }

.pgpt-reklam img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.pgpt-reklam picture {
  display: block;
  max-width: 100%;
}

/* Link sarmalayıcısı taşma yapmasın */
.pgpt-reklam__link {
  display: inline-block;
  max-width: 100%;
}

.pgpt-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.pgpt-popup[hidden] {
  display: none !important;
}

.pgpt-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.pgpt-popup__dialog {
  position: relative;
  width: fit-content;
  min-width: 0;
  max-width: min(92vw, 900px);
  max-height: 90vh;
  margin: 5vh auto;
  overflow: auto;
  background: #fff;
  padding: 12px;
}

.pgpt-popup__content .pgpt-reklam {
  margin-bottom: 0;
  display: flex;
  justify-content: center;
}

/* Popup: picture'a fit-content genişliği verilip img display:block kalır.
   fit-content → tarayıcı intrinsic (doğal) genişlik = orijinal piksel boyutu. */
.pgpt-popup__content .pgpt-reklam picture {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
}

.pgpt-popup__content .pgpt-reklam img {
  display: block;
  height: auto;
  max-width: 100%;
}

/* Tam zincir — başka hiçbir kural bu seçicileri geçersiz kılamaz */
.pgpt-popup.pgpt-popup .pgpt-popup__dialog .pgpt-popup__content .pgpt-reklam {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 0 !important;
}

.pgpt-popup.pgpt-popup .pgpt-popup__dialog .pgpt-popup__content .pgpt-reklam__link {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
}

.pgpt-popup.pgpt-popup .pgpt-popup__dialog .pgpt-popup__content .pgpt-reklam picture {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
}

.pgpt-popup.pgpt-popup .pgpt-popup__dialog .pgpt-popup__content .pgpt-reklam img {
  display: block;
  height: auto;
  max-width: 100%;
}

.pgpt-popup__close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

html.pgpt-popup-open,
body.pgpt-popup-open {
  overflow: hidden;
}
