/***
====================================================================
          LADY IN WHITE — SUCCESS MODAL
====================================================================
***/

.liw-success-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  overflow-y: auto;
  overflow-x: hidden;

  -webkit-overflow-scrolling: touch;
}

/* =====================================================
   IMPORTANT:
   Existing form JS sets:
   style.display = "inline-block"
   This converts that into the full-screen modal.
===================================================== */

.liw-success-modal[style*="inline-block"] {
  display: flex !important;
}

/* =====================================================
   OVERLAY
===================================================== */

.liw-success-modal__overlay {
  position: fixed;
  inset: 0;

  background: rgba(13, 25, 57, 0.58);

  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* =====================================================
   DIALOG
===================================================== */

.liw-success-modal__dialog {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 510px;

  padding: 42px 36px 34px;

  background: #ffffff;

  border: 1px solid rgba(18, 57, 172, 0.08);
  border-radius: 18px;

  text-align: center;

  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);

  animation: liwSuccessModalIn 0.28s ease both;
}

/* =====================================================
   MODAL ANIMATION
===================================================== */

@keyframes liwSuccessModalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =====================================================
   CLOSE
===================================================== */

.liw-success-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  padding: 0;

  color: #1239ac;
  background: #f3f6fb;

  border: 0;
  border-radius: 50%;

  font-size: 20px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.liw-success-modal__close:hover {
  color: #1239ac;
  background: #ffb400;

  transform: rotate(90deg);
}

/* =====================================================
   ICON
===================================================== */

.liw-success-modal__icon {
  width: 70px;
  height: 70px;

  margin: 0 auto 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #1239ac;
  background: #ffb400;

  border-radius: 50%;

  font-size: 28px;

  box-shadow: 0 12px 26px rgba(255, 180, 0, 0.24);
}

/* =====================================================
   HEADING
===================================================== */

.liw-success-modal__dialog h2 {
  margin: 0 0 12px;

  color: #1239ac;

  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

/* =====================================================
   TEXT
===================================================== */

.liw-success-modal__dialog p {
  max-width: 420px;

  margin: 0 auto 24px;

  color: #667085;

  font-size: 14px;
  line-height: 1.7;
}

/* =====================================================
   CONTINUE BUTTON
===================================================== */

.liw-success-modal__continue {
  min-height: 44px;
  padding: 0 24px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  background: #1239ac;

  border: 2px solid #1239ac;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.liw-success-modal__continue:hover {
  color: #1239ac;
  background: #ffb400;

  border-color: #ffb400;

  transform: translateY(-1px);
}

/* =====================================================
   FOCUS
===================================================== */

.liw-success-modal__close:focus-visible,
.liw-success-modal__continue:focus-visible {
  outline: 3px solid rgba(255, 180, 0, 0.55);
  outline-offset: 3px;
}

/* =====================================================
   MOBILE — KEEP ENTIRE POPUP VISIBLE
===================================================== */

@media (max-width: 600px) {
  .liw-success-modal {
    inset: 0;

    width: 100%;
    height: 100dvh;
    min-height: 100dvh;

    align-items: flex-start;
    justify-content: center;

    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));

    overflow-y: auto;
    overflow-x: hidden;

    -webkit-overflow-scrolling: touch;
  }

  .liw-success-modal__dialog {
    width: 100%;
    max-width: 500px;

    margin: auto 0;

    padding: 34px 22px 26px;

    flex-shrink: 0;

    border-radius: 15px;
  }

  .liw-success-modal__close {
    top: 11px;
    right: 11px;

    width: 34px;
    height: 34px;
  }

  .liw-success-modal__icon {
    width: 62px;
    height: 62px;

    margin-bottom: 17px;

    font-size: 24px;
  }

  .liw-success-modal__dialog h2 {
    font-size: 25px;
  }

  .liw-success-modal__dialog p {
    margin-bottom: 21px;

    font-size: 13px;
    line-height: 1.6;
  }

  .liw-success-modal__continue {
    width: 100%;
  }
}

/* =====================================================
   SHORT MOBILE SCREENS
===================================================== */

@media (max-width: 600px) and (max-height: 600px) {
  .liw-success-modal {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .liw-success-modal__dialog {
    margin: 0;

    padding: 28px 18px 20px;
  }

  .liw-success-modal__icon {
    width: 54px;
    height: 54px;

    margin-bottom: 12px;

    font-size: 22px;
  }

  .liw-success-modal__dialog h2 {
    margin-bottom: 8px;

    font-size: 22px;
  }

  .liw-success-modal__dialog p {
    margin-bottom: 16px;

    font-size: 12.5px;
    line-height: 1.5;
  }
}

/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {
  .liw-success-modal__dialog,
  .liw-success-modal__close,
  .liw-success-modal__continue {
    animation: none;
    transition: none;
  }
}
