/**
 * DEXA Insights Popup Styles
 * Matches The Ability Clinic Brand & DEXA Insights Dashboard
 */

/* Overlay & Backdrop */
.dexa-popup-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  box-sizing: border-box;
}

.dexa-popup-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dexa-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 14, 28, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

/* Modal Dialog Container */
.dexa-popup-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  background: linear-gradient(135deg, #091a33 0%, #0d284f 55%, #0a1f3c 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.65), 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 44px 50px;
  color: #ffffff;
  overflow: hidden;
  transform: scale(0.92) translateY(18px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  box-sizing: border-box;
}

.dexa-popup-overlay.active .dexa-popup-container {
  transform: scale(1) translateY(0);
}

.dexa-popup-overlay.closing .dexa-popup-container {
  transform: scale(0.94) translateY(12px);
  opacity: 0;
}

/* Close Button */
.dexa-popup-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.dexa-popup-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

.dexa-popup-close:hover {
  background: #f37822;
  color: #ffffff;
  transform: rotate(90deg);
}

.dexa-popup-close:focus-visible {
  outline: 2px solid #f37822;
  outline-offset: 2px;
}

/* Popup Inner Layout Reset & Tweaks */
.dexa-popup-main-wrap {
  padding: 0 !important;
  margin: 0 !important;
  position: static !important;
}

.dexa-popup-main-wrap .dexa-insights-content-col {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.dexa-popup-main-wrap .dexa-insights-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.dexa-popup-main-wrap .dexa-insights-brand-badge {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.dexa-popup-main-wrap .dexa-insights-brand-badge img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.dexa-popup-main-wrap .dexa-insights-brand-text {
  font-family: 'Arimo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1;
}

.dexa-popup-main-wrap .dexa-insights-eyebrow {
  font-family: 'Lato', sans-serif;
  color: #f37822;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.dexa-popup-main-wrap .dexa-insights-title {
  font-family: 'Archivo Black', 'Montserrat', Arial Black, sans-serif !important;
  font-size: clamp(26px, 3.4vw, 42px) !important;
  line-height: 1.1 !important;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 16px !important;
  font-weight: 900 !important;
}

.dexa-popup-main-wrap .dexa-insights-title .title-white {
  color: #ffffff;
  display: block;
}

.dexa-popup-main-wrap .dexa-insights-title .title-orange {
  color: #f37822;
  display: block;
}

.dexa-popup-main-wrap .dexa-insights-desc,
.dexa-popup-main-wrap .dexa-insights-desc p {
  font-family: 'Lato', sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  max-width: 490px;
  margin-bottom: 22px !important;
}

.dexa-popup-main-wrap .dexa-insights-cta-wrap {
  margin-top: 5px;
}

.dexa-popup-main-wrap .dexa-insights-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f37822;
  color: #ffffff !important;
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 13px 30px;
  border-radius: 50px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(243, 120, 34, 0.38);
}

.dexa-popup-main-wrap .dexa-insights-btn:hover {
  background: #df6412;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(243, 120, 34, 0.48);
}

.dexa-popup-main-wrap .dexa-insights-btn svg,
.dexa-popup-main-wrap .dexa-insights-btn i {
  transition: transform 0.2s ease;
}

.dexa-popup-main-wrap .dexa-insights-btn:hover svg,
.dexa-popup-main-wrap .dexa-insights-btn:hover i {
  transform: translateX(4px);
}

/* Right: QR Code Card in Popup */
.dexa-popup-main-wrap .dexa-insights-qr-col {
  padding-bottom: 0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.dexa-popup-main-wrap .dexa-insights-qr-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 20px 18px 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  text-align: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 210px;
  width: 100%;
}

.dexa-popup-main-wrap .dexa-insights-qr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
}

.dexa-popup-main-wrap .dexa-insights-qr-frame {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dexa-popup-main-wrap .dexa-insights-qr-img {
  width: 160px;
  height: 160px;
  max-width: 100%;
  display: block;
  object-fit: contain;
  margin-bottom: 12px;
}

.dexa-popup-main-wrap .dexa-insights-qr-label {
  font-family: 'Lato', 'Arial Black', sans-serif;
  font-size: 13px;
  font-weight: 900;
  color: #161a40;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.25;
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .dexa-popup-container {
    max-width: 720px;
    padding: 38px 36px;
  }

  .dexa-popup-main-wrap .dexa-insights-qr-card {
    max-width: 185px;
    padding: 16px 14px 14px;
  }

  .dexa-popup-main-wrap .dexa-insights-qr-img {
    width: 135px;
    height: 135px;
  }
}

@media (max-width: 767px) {
  .dexa-popup-overlay {
    padding: 14px;
  }

  .dexa-popup-container {
    padding: 32px 22px 26px;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .dexa-popup-close {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
  }

  .dexa-popup-main-wrap .dexa-insights-content-col {
    text-align: center;
  }

  .dexa-popup-main-wrap .dexa-insights-brand {
    justify-content: center;
  }

  .dexa-popup-main-wrap .dexa-insights-desc,
  .dexa-popup-main-wrap .dexa-insights-desc p {
    margin-left: auto;
    margin-right: auto;
    font-size: 14px !important;
  }

  .dexa-popup-main-wrap .dexa-insights-cta-wrap {
    margin-bottom: 0;
  }

  /* On small mobile, QR is hidden by d-none d-md-flex or if shown: */
  .dexa-popup-main-wrap .dexa-insights-qr-col {
    justify-content: center !important;
    margin-top: 20px;
  }
}

