/* =============================================================================
   ElkonPopup – modern felugró tájékoztató ablak
   src/elkon-popup/elkon-popup.css   (JS: elkon-popup.js)
   Admin előnézet: admin/includes/felugro_ablak_beallitasok.php
   ============================================================================= */
.elkon-popup-overlay {
  --ep-brand: #aa0065;
  --ep-brand-2: #e0338f;
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 8, 16, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.elkon-popup-overlay.ep-open { opacity: 1; }

.elkon-popup {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transform: translateY(18px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  font-size: 1rem;
  line-height: 1.55;
  color: #2b2b2b;
}
.elkon-popup-overlay.ep-open .elkon-popup { transform: none; }

/* felső márkaszínű csík */
.elkon-popup::before {
  content: '';
  display: block;
  height: 6px;
  flex: 0 0 6px;
  background: linear-gradient(90deg, var(--ep-brand), var(--ep-brand-2));
}

.elkon-popup-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  /* jobbra hely a bezáró (×) gombnak: 16px + 36px + térköz – a cím ne csússzon alá */
  padding: 20px 64px 6px 22px;
}
.elkon-popup-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fbe9f3;
  color: var(--ep-brand);
  font-size: 18px;
}
.elkon-popup-title {
  flex: 1;
  margin: 0;
  padding-top: 7px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1d1d1f;
}

.elkon-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f3f5;
  color: #555;
  /* a × pontosan középen (flex), nem a betű alapvonalához igazítva */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}
.elkon-popup-close:hover { background: #fbe9f3; color: var(--ep-brand); }
.elkon-popup-close:focus-visible { outline: 3px solid rgba(170, 0, 101, 0.35); outline-offset: 2px; }

.elkon-popup-body {
  padding: 10px 22px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
/* ha nincs cím, a tartalom ne csússzon a bezáró gomb alá */
.elkon-popup.ep-no-title .elkon-popup-body { padding-top: 22px; padding-right: 64px; }
.elkon-popup-body img { max-width: 100%; height: auto; border-radius: 10px; }
.elkon-popup-body iframe, .elkon-popup-body video { max-width: 100%; border-radius: 10px; }
.elkon-popup-body > :last-child { margin-bottom: 0; }

.elkon-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px 18px;
  border-top: 1px solid #f0f0f2;
}
.elkon-popup-timer { font-size: 0.95rem; color: #777; }
.elkon-popup-btn {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  padding: 10px 26px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, var(--ep-brand), var(--ep-brand-2));
  box-shadow: 0 6px 16px rgba(170, 0, 101, 0.3);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.elkon-popup-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(170, 0, 101, 0.38); }
.elkon-popup-btn:focus-visible { outline: 3px solid rgba(170, 0, 101, 0.35); outline-offset: 2px; }

/* automatikus bezárás visszaszámláló csík */
.elkon-popup-progress {
  height: 4px;
  flex: 0 0 4px;
  background: #f3e4ec;
}
.elkon-popup-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--ep-brand), var(--ep-brand-2));
  transform-origin: left center;
}

/* sorszám, ha több ablak jön egymás után */
.elkon-popup-counter {
  font-size: 0.9rem;
  color: #999;
}

/* mobilon alulról felcsúszó lap */
@media (max-width: 575.98px) {
  .elkon-popup-overlay { align-items: flex-end; padding: 0; }
  .elkon-popup {
    max-width: none;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .elkon-popup-btn { flex: 1; }
  .elkon-popup-header { padding: 18px 60px 6px 18px; gap: 10px; }
  .elkon-popup-icon { flex-basis: 36px; width: 36px; height: 36px; font-size: 16px; }
  .elkon-popup-title { font-size: 1.15rem; padding-top: 6px; overflow-wrap: anywhere; }
  .elkon-popup-close { top: 14px; right: 12px; }
  .elkon-popup-body { padding-left: 18px; padding-right: 18px; }
  .elkon-popup.ep-no-title .elkon-popup-body { padding-right: 58px; }
}

/* a webshop globális stílusai (h2, button) ne írják felül az ablakot */
.elkon-popup, .elkon-popup-title, .elkon-popup-btn, .elkon-popup-close {
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
}
.elkon-popup-btn, .elkon-popup-close { min-height: 0; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  .elkon-popup-overlay, .elkon-popup, .elkon-popup-close, .elkon-popup-btn { transition: none; }
}
