/* Dynamic Popup & Notification Bar v1.1 */

/* ── Base reset ── */
.dp-overlay, .dp-bar, .dp-slidein,
.dp-overlay *, .dp-bar *, .dp-slidein * { box-sizing: border-box; }

/* ── Shared inner card ── */
.dp-inner {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* ════════════════════════════════
   MODAL
════════════════════════════════ */
.dp-overlay {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: dpFadeIn .22s ease both;
}
.dp-overlay .dp-inner {
  position: relative;
  border-radius: 14px;
  padding: 36px 32px 28px;
  max-width: 460px; width: 100%;
  animation: dpScaleIn .24s cubic-bezier(.22,.68,0,1.2) both;
}
.dp-overlay .dp-headline {
  font-size: 20px; font-weight: 700; margin: 0 24px 10px 0; line-height: 1.25;
}
.dp-overlay .dp-body {
  font-size: 14px; opacity: .88; margin: 0 0 20px; line-height: 1.6;
}
.dp-overlay .dp-btn {
  display: inline-block; padding: 11px 24px;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: filter .15s;
}
.dp-overlay .dp-btn:hover { filter: brightness(1.08); }

/* ════════════════════════════════
   NOTIFICATION BAR
════════════════════════════════ */
.dp-bar {
  position: fixed; left: 0; right: 0; z-index: 99999;
}
.dp-bar-top    { top: 0;    animation: dpSlideDown .28s ease both; }
.dp-bar-bottom { bottom: 0; animation: dpSlideUp   .28s ease both; }
.dp-bar .dp-inner {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 10px 20px;
  padding: 11px 52px 11px 20px; position: relative;
}
.dp-bar .dp-headline {
  font-size: 14px; font-weight: 600; margin: 0;
}
.dp-bar .dp-body {
  font-size: 13px; opacity: .85; margin: 0;
}
.dp-bar .dp-btn {
  display: inline-block; padding: 6px 16px;
  border-radius: 6px; font-size: 13px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; white-space: nowrap;
  transition: filter .15s;
}
.dp-bar .dp-btn:hover { filter: brightness(1.08); }

/* ════════════════════════════════
   SLIDE-IN
════════════════════════════════ */
.dp-slidein {
  position: fixed; bottom: 24px; right: 24px; z-index: 99998;
  max-width: 320px; width: calc(100vw - 48px);
  animation: dpSlideInRight .3s cubic-bezier(.22,.68,0,1.1) both;
}
.dp-slidein .dp-inner {
  border-radius: 12px;
  padding: 24px 22px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.1);
}
.dp-slidein .dp-headline {
  font-size: 16px; font-weight: 700; margin: 0 24px 8px 0; line-height: 1.3;
}
.dp-slidein .dp-body {
  font-size: 13px; opacity: .88; margin: 0 0 16px; line-height: 1.55;
}
.dp-slidein .dp-btn {
  display: inline-block; padding: 9px 20px;
  border-radius: 7px; font-size: 13px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: filter .15s;
}
.dp-slidein .dp-btn:hover { filter: brightness(1.08); }

/* ── Close button (all types) ── */
.dp-close {
  position: absolute; top: 12px; right: 14px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: none; cursor: pointer; font-size: 14px; line-height: 1;
  color: inherit; opacity: .8; display: flex; align-items: center; justify-content: center;
  transition: opacity .12s, background .12s;
}
.dp-close:hover { opacity: 1; background: rgba(255,255,255,.35); }

/* ── Animations ── */
@keyframes dpFadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes dpScaleIn   { from { opacity: 0; transform: scale(.9) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dpSlideDown { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes dpSlideUp   { from { transform: translateY(100%);  } to { transform: none; } }
@keyframes dpSlideInRight { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: none; } }

/* ── Dismiss (fade out) ── */
.dp-hiding {
  animation: dpFadeIn .2s ease reverse both !important;
  pointer-events: none;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .dp-overlay .dp-inner   { padding: 28px 20px 22px; }
  .dp-overlay .dp-headline { font-size: 18px; }
  .dp-bar .dp-inner        { padding: 10px 44px 10px 14px; }
  .dp-slidein              { bottom: 16px; right: 12px; left: 12px; width: auto; max-width: none; }
}

/* ── Image inside popup ───────────────────────────── */
.dp-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 12px;
}
.dp-img-link { display: block; line-height: 0; }
.dp-img-link .dp-img { margin-bottom: 0; border-radius: 0; }

/* ── Image-only modal — no padding, image flush to edges ── */
.dp-overlay-img .dp-inner {
  padding: 0 !important;
  background: transparent !important;
  overflow: hidden;
  border-radius: 12px;
  max-width: 480px;
}
.dp-overlay-img .dp-img,
.dp-overlay-img .dp-img-link .dp-img {
  border-radius: 12px;
  margin-bottom: 0;
  display: block;
  width: 100%;
}
.dp-close-img {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 10;
  background: rgba(0,0,0,.45) !important;
  color: #fff !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 18px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  cursor: pointer !important;
}
.dp-overlay-img .dp-inner { position: relative; }
