/* ==========================================================================
   SHREE JEE ASSOCIATE — payment.css
   Styles for the ATMT PRO payment modal ONLY.

   Every selector in this file is prefixed with .sja-pay, and the modal itself
   is injected into <body> by js/payment.js. Nothing here can reach the
   existing page: no element, class or variable already on the site is
   redefined. Removing this file and payment.js returns the page exactly to
   how it was.

   Brand variables (--navy-800, --gold-500 …) are read from css/style.css with
   plain fallbacks, so the modal still looks right if this file is ever loaded
   on a page that does not include the main stylesheet.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Overlay
   -------------------------------------------------------------------------- */
.sja-pay-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 23, 44, 0.66);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
  overflow-y: auto;
}

.sja-pay-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.sja-pay-modal {
  width: 100%;
  max-width: 460px;
  margin: auto;
  background: var(--white, #ffffff);
  color: var(--ink, #12212f);
  border-radius: var(--r-lg, 20px);
  box-shadow: 0 24px 60px rgba(5, 23, 44, 0.32);
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow: hidden;
}

.sja-pay-overlay.is-open .sja-pay-modal {
  transform: translateY(0) scale(1);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.sja-pay-head {
  position: relative;
  padding: 22px 54px 20px 26px;
  background: linear-gradient(135deg, var(--navy-800, #082445), var(--navy-600, #0e3d6e));
  color: #fff;
}

.sja-pay-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400, #e0bb4e);
  margin-bottom: 6px;
}

.sja-pay-head h2 {
  margin: 0;
  font-family: var(--font-head, Georgia, serif);
  font-size: 1.32rem;
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
}

.sja-pay-head p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
}

.sja-pay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.18s ease;
}

.sja-pay-close:hover,
.sja-pay-close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}

/* --------------------------------------------------------------------------
   Price strip
   -------------------------------------------------------------------------- */
.sja-pay-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 26px;
  background: var(--grey-50, #f7f9fc);
  border-bottom: 1px solid var(--grey-200, #dfe6ef);
}

.sja-pay-price .sja-pay-item {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--grey-700, #3c4a5c);
}

.sja-pay-price .sja-pay-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-800, #082445);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Body + fields
   -------------------------------------------------------------------------- */
.sja-pay-body {
  padding: 22px 26px 26px;
}

.sja-pay-field {
  margin-bottom: 15px;
}

.sja-pay-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grey-700, #3c4a5c);
  margin-bottom: 6px;
}

.sja-pay-field label .sja-pay-req {
  color: var(--danger, #c0392b);
  margin-left: 2px;
}

.sja-pay-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink, #12212f);
  background: #fff;
  border: 1.5px solid var(--grey-200, #dfe6ef);
  border-radius: var(--r-sm, 8px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  /* 16px on iOS stops Safari zooming the page when the field is focused. */
  -webkit-appearance: none;
  appearance: none;
}

.sja-pay-field input:focus {
  outline: none;
  border-color: var(--royal-500, #1a63c9);
  box-shadow: 0 0 0 3px rgba(26, 99, 201, 0.14);
}

.sja-pay-field.has-error input {
  border-color: var(--danger, #c0392b);
}

.sja-pay-field.has-error input:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}

.sja-pay-error {
  display: none;
  font-size: 0.78rem;
  color: var(--danger, #c0392b);
  margin-top: 5px;
}

.sja-pay-field.has-error .sja-pay-error {
  display: block;
}

/* Honeypot — off-screen, never shown, never announced. */
.sja-pay-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Alert
   -------------------------------------------------------------------------- */
.sja-pay-alert {
  display: none;
  padding: 11px 14px;
  border-radius: var(--r-sm, 8px);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

.sja-pay-alert.show {
  display: block;
}

.sja-pay-alert a {
  color: inherit;
  font-weight: 700;
}

.sja-pay-alert-error {
  background: #fdeceb;
  color: #8e2b20;
  border: 1px solid #f3c9c4;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.sja-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 20px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: var(--r-pill, 999px);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.sja-pay-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.sja-pay-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.sja-pay-btn-primary {
  background: linear-gradient(135deg, var(--gold-600, #a8801d), var(--gold-500, #c9a227));
  color: #12212f;
  box-shadow: var(--sh-gold, 0 10px 26px rgba(169, 128, 29, 0.28));
}

.sja-pay-btn-secondary {
  background: transparent;
  color: var(--grey-700, #3c4a5c);
  border: 1.5px solid var(--grey-200, #dfe6ef);
  box-shadow: none;
}

.sja-pay-btn-whatsapp {
  background: #25d366;
  color: #05321a;
}

.sja-pay-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Trust line
   -------------------------------------------------------------------------- */
.sja-pay-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  font-size: 0.76rem;
  color: var(--grey-500, #6b7d94);
  text-align: center;
}

.sja-pay-trust svg {
  width: 14px;
  height: 14px;
  flex: none;
}

/* --------------------------------------------------------------------------
   Busy + success states
   -------------------------------------------------------------------------- */
.sja-pay-state {
  display: none;
  padding: 34px 26px 30px;
  text-align: center;
}

.sja-pay-state.is-active {
  display: block;
}

.sja-pay-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
  border: 3px solid var(--grey-200, #dfe6ef);
  border-top-color: var(--royal-500, #1a63c9);
  border-radius: 50%;
  animation: sja-pay-spin 0.8s linear infinite;
}

@keyframes sja-pay-spin {
  to {
    transform: rotate(360deg);
  }
}

.sja-pay-tick {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(26, 127, 82, 0.12);
  color: var(--success, #1a7f52);
}

.sja-pay-tick svg {
  width: 30px;
  height: 30px;
}

.sja-pay-state h3 {
  margin: 0 0 8px;
  font-family: var(--font-head, Georgia, serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink, #12212f);
}

.sja-pay-state p {
  margin: 0 0 6px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft, #4a5a6d);
}

.sja-pay-receipt {
  margin: 16px 0 18px;
  padding: 12px 14px;
  background: var(--grey-50, #f7f9fc);
  border: 1px solid var(--grey-200, #dfe6ef);
  border-radius: var(--r-sm, 8px);
  font-size: 0.8rem;
  color: var(--grey-700, #3c4a5c);
  text-align: left;
  word-break: break-all;
}

.sja-pay-receipt b {
  color: var(--ink, #12212f);
}

/* Content is hidden per state rather than removed, so the form keeps what the
   customer typed if they come back from an error. */
.sja-pay-form-wrap.is-hidden {
  display: none;
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .sja-pay-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .sja-pay-modal {
    max-width: none;
    border-radius: var(--r-lg, 20px) var(--r-lg, 20px) 0 0;
    transform: translateY(40px);
  }

  .sja-pay-head {
    padding: 20px 52px 18px 20px;
  }

  .sja-pay-head h2 {
    font-size: 1.16rem;
  }

  .sja-pay-price,
  .sja-pay-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Fields at 16px keep iOS Safari from zooming in on focus. */
  .sja-pay-field input {
    font-size: 16px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sja-pay-overlay,
  .sja-pay-modal,
  .sja-pay-btn {
    transition: none;
  }

  .sja-pay-spinner {
    animation-duration: 1.6s;
  }
}
