/* RadioTEDU Popup — görünüm. Bütün sınıflar rtp- önekli; sitenin stillerine dokunmaz. */
.rtp-root {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  pointer-events: none;
  font-family: inherit;
}
.rtp-root *, .rtp-root *::before, .rtp-root *::after { box-sizing: border-box; }

.rtp-overlay {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  opacity: 0;
  transition: opacity .25s ease;
}

.rtp-box {
  position: relative;
  pointer-events: auto;
  width: min(var(--rtp-width, 560px), 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  border-radius: var(--rtp-radius, 14px);
  background: #fff;
  color: #111;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  /* kapatma düğmesi köşenin dışına taşabilsin diye kırpma .rtp-body'de */
  overflow: visible;
  display: flex;
  flex-direction: column;
  transition: opacity .25s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.rtp-type-image .rtp-box { background: transparent; }

.rtp-body { overflow: auto; border-radius: inherit; }
.rtp-box:focus { outline: none; }
.rtp-link, .rtp-image { display: block; }
.rtp-image { width: 100%; height: auto; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); object-fit: contain; }

.rtp-content { padding: 28px 28px 8px; line-height: 1.55; font-size: 16px; }
.rtp-content > :first-child { margin-top: 0; }
.rtp-content img { max-width: 100%; height: auto; }
/* editörden eklenen görseller (WordPress'in wp-image-… sınıfı) popup genişliğini doldurur; sola/sağa yaslama kapanır */
.rtp-content img[class*="wp-image-"] { display: block; width: 100%; height: auto; }
.rtp-content .alignleft, .rtp-content .alignright, .rtp-content .aligncenter { float: none; margin: 0 0 12px; }
.rtp-content figure { margin: 0 0 12px; max-width: 100%; }
.rtp-content figure img { width: 100%; }
.rtp-content a img { display: block; }

/* HTML popup: kendi tasarımı yalıtılmış çerçevede; yükseklik içeriğe göre ayarlanır */
.rtp-html { display: block; width: 100%; height: 360px; border: 0; background: #fff; }
.rtp-type-html .rtp-body { overflow: hidden; }
.rtp-button {
  display: inline-block;
  margin: 12px 28px 26px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #ed1c24;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
}
.rtp-button:hover, .rtp-button:focus-visible { background: #c5141b; }

.rtp-close {
  position: absolute;
  /* başlıksız popupta düğme içeriğin üstüne binmesin: köşenin dışında durur */
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* sitenin kendi kapatma düğmesi gibi: beyaz, koyu çarpı */
  background: #fff;
  color: #111;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .08), 0 6px 18px rgba(0, 0, 0, .28);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
/* çarpı: düğmenin rengini (currentColor) alan bir maske; dairesiyle aynı katmanda çizildiği için hep ortada */
.rtp-close::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272.4%27 stroke-linecap=%27round%27%3E%3Cpath d=%27M6 6l12 12M18 6L6 18%27/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272.4%27 stroke-linecap=%27round%27%3E%3Cpath d=%27M6 6l12 12M18 6L6 18%27/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  transition: transform .2s ease;
}
.rtp-close:hover { background: #ed1c24; color: #fff; transform: scale(1.06); }
.rtp-close:hover::before { transform: rotate(90deg); }
.rtp-close:active { transform: scale(.96); }

/* başlıklı görünüm: sitenin haftalık gazete penceresiyle aynı çerçeve */
.rtp-framed .rtp-box { padding: 8px; background: #f7f7f5; color: #111; }
.rtp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 8px 8px; flex: none; }
.rtp-title { font: 700 12px/1.2 Arial, sans-serif; letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtp-framed .rtp-close { position: relative; top: auto; right: auto; flex: none; box-shadow: 0 0 0 1px #d8d8d5; }
.rtp-framed .rtp-body { border-radius: 4px; }
.rtp-framed .rtp-close:hover { background: #ed1c24; color: #fff; box-shadow: none; }
.rtp-framed .rtp-link, .rtp-framed .rtp-image { border-radius: 4px; }
.rtp-framed .rtp-link { overflow: hidden; }
.rtp-framed .rtp-image { max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); }
.rtp-close:focus-visible, .rtp-link:focus-visible, .rtp-button:focus-visible { outline: 3px solid #ed1c24; outline-offset: 2px; }

.rtp-timer {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: #ed1c24;
  transform-origin: left;
  animation: rtp-timer linear forwards;
}
@keyframes rtp-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* konumlar: köşe ve alt bant popupları sayfayı kilitlemez */
.rtp-pos-bottom-right { align-items: flex-end; justify-content: flex-end; }
.rtp-pos-bottom-left { align-items: flex-end; justify-content: flex-start; }
.rtp-pos-bottom-right .rtp-box, .rtp-pos-bottom-left .rtp-box { width: min(var(--rtp-width, 560px), 420px, 100%); }
.rtp-pos-bottom-bar { align-items: flex-end; padding: 0; }
.rtp-pos-bottom-bar .rtp-box { width: 100%; max-width: none; border-radius: var(--rtp-radius, 14px) var(--rtp-radius, 14px) 0 0; }
.rtp-pos-bottom-bar .rtp-image { max-height: 40vh; }
.rtp-pos-bottom-bar .rtp-close { right: 12px; }

/* animasyonlar */
.rtp-open .rtp-overlay { opacity: 1; }
.rtp-anim-fade .rtp-box, .rtp-anim-zoom .rtp-box, .rtp-anim-slide .rtp-box { opacity: 0; }
.rtp-anim-zoom .rtp-box { transform: scale(.92); }
.rtp-anim-slide .rtp-box { transform: translateY(40px); }
.rtp-open .rtp-box { opacity: 1; transform: none; }
.rtp-anim-none .rtp-box, .rtp-anim-none .rtp-overlay { transition: none; }

@media (max-width: 767px) {
  .rtp-root { padding: 18px; }
  .rtp-close { top: -12px; right: -12px; width: 38px; height: 38px; }
  .rtp-box, .rtp-pos-bottom-right .rtp-box, .rtp-pos-bottom-left .rtp-box { width: min(var(--rtp-mobile-width, 92vw), 100%); }
  /* alt bant telefonda da kenardan kenara */
  .rtp-pos-bottom-bar { padding: 0; }
  .rtp-pos-bottom-bar .rtp-box { width: 100%; }
  .rtp-content { padding: 22px 20px 6px; }
  .rtp-button { margin: 10px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .rtp-box, .rtp-overlay, .rtp-close, .rtp-close::before { transition: none !important; }
  .rtp-close:hover, .rtp-close:hover::before { transform: none; }
  .rtp-timer { animation: none; }
}
