/* OAI Popup Banner - Frontend CSS */
#oai-popup-banner {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  padding: 20px;
  box-sizing: border-box;
  font-family: inherit;
}

#oai-popup-banner.is-open {
  display: flex;
}

/* Position presets */
#oai-popup-banner.pos-center {
  align-items: center;
  justify-content: center;
}

#oai-popup-banner.pos-bottom_left {
  align-items: flex-end;
  justify-content: flex-start;
}

#oai-popup-banner.pos-bottom_right {
  align-items: flex-end;
  justify-content: flex-end;
}

#oai-popup-banner.pos-top_bar {
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}

#oai-popup-banner.pos-bottom_bar {
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

#oai-popup-banner .oai-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

#oai-popup-banner.pos-top_bar .oai-popup-overlay,
#oai-popup-banner.pos-bottom_bar .oai-popup-overlay {
  background: rgba(0,0,0,0.35);
}

#oai-popup-banner .oai-popup-dialog {
  position: relative;
  width: var(--oai-width, 520px);
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--oai-bg, #fff);
  color: var(--oai-text, #111827);
  border-radius: var(--oai-radius, 18px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  z-index: 2;
  outline: none;
}

/* Bar modes: take full width */
#oai-popup-banner.pos-top_bar .oai-popup-dialog,
#oai-popup-banner.pos-bottom_bar .oai-popup-dialog {
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  max-height: 100vh;
}

#oai-popup-banner .oai-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.06);
  color: inherit;
  cursor: pointer;
  z-index: 3;
}

#oai-popup-banner .oai-popup-close:hover {
  background: rgba(0,0,0,0.10);
}

#oai-popup-banner .oai-popup-body {
  display: flex;
  gap: 16px;
  padding: 18px;
  box-sizing: border-box;
}

#oai-popup-banner .oai-popup-media {
  flex: 0 0 180px;
}

#oai-popup-banner .oai-popup-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--oai-radius, 18px) - 6px);
}

#oai-popup-banner .oai-popup-content {
  flex: 1 1 auto;
  min-width: 0;
}

#oai-popup-banner .oai-popup-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

#oai-popup-banner .oai-popup-message {
  font-size: 15px;
  line-height: 1.6;
}

#oai-popup-banner .oai-popup-actions {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

#oai-popup-banner .oai-popup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--oai-accent, #2563eb);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

#oai-popup-banner .oai-popup-button:hover {
  filter: brightness(0.95);
}

#oai-popup-banner .oai-popup-dontshow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  user-select: none;
}

#oai-popup-banner .oai-popup-customizer-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--oai-accent, #2563eb);
  background: rgba(0,0,0,0.04);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
  #oai-popup-banner {
    padding: 14px;
  }
  #oai-popup-banner .oai-popup-dialog {
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
  }
  #oai-popup-banner .oai-popup-body {
    flex-direction: column;
  }
  #oai-popup-banner .oai-popup-media {
    flex: 0 0 auto;
  }
}

/* Scroll lock */
html.oai-popup-scroll-lock,
html.oai-popup-scroll-lock body {
  overflow: hidden !important;
}
