/* =========================================================
   SD ANDROIDE · POPUP GLOBAL REUTILIZABLE
========================================================= */

body.sd-popup-sd-open {
  overflow: hidden !important;
}

.sd-popup-sd {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.sd-popup-sd.is-open {
  display: flex;
}

.sd-popup-sd__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 18, 32, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.sd-popup-sd__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1180px, 96vw);
  height: min(88vh, 900px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.sd-popup-sd__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  padding: 14px 18px 14px 24px;
  background: linear-gradient(135deg, #071d32 0%, #0b2743 55%, #0867b2 100%);
}

.sd-popup-sd__title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
}

.sd-popup-sd__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #ffffff;
  font: inherit;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sd-popup-sd__close:hover,
.sd-popup-sd__close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.04);
}

.sd-popup-sd__content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #f4f8fb;
}

.sd-popup-sd__iframe {
  display: block;
  width: 100%;
  height: 100%;
  background: #f4f8fb;
  border: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sd-popup-sd.is-loaded .sd-popup-sd__iframe {
  opacity: 1;
}

.sd-popup-sd__loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #0b2743;
  font-weight: 700;
  background: #f4f8fb;
}

.sd-popup-sd.is-loaded .sd-popup-sd__loader {
  display: none;
}

.sd-popup-sd__spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(8, 103, 178, 0.22);
  border-top-color: #0867b2;
  border-radius: 50%;
  animation: sd-popup-spin 0.75s linear infinite;
}

@keyframes sd-popup-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
  .sd-popup-sd {
    padding: 0;
  }

  .sd-popup-sd__dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .sd-popup-sd__header {
    min-height: 60px;
    padding: 10px 12px 10px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-popup-sd__iframe,
  .sd-popup-sd__close {
    transition: none;
  }
}
