/* SmartGrowth Secure Checkout — premium dark-glass payment modal (Indicators only) */

/* Hard reset so the host theme's global button/input styles can never bleed
   into the modal (Astra and similar themes apply fairly aggressive global
   `button` rules that otherwise win on specificity/source order). */
.sgip-overlay button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.sgip-overlay input {
  all: revert;
  box-sizing: border-box;
  font-family: 'DM Sans', sans-serif;
}

.sgip-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 6, 9, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .28s ease;
  font-family: 'DM Sans', sans-serif;
}
.sgip-overlay.sgip-open {
  display: flex;
  opacity: 1;
}

.sgip-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(165deg, #14171f 0%, #0a0c11 100%);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.65), 0 0 0 1px rgba(47,227,216,.06), 0 0 60px -10px rgba(47,227,216,.15);
  padding: 28px 26px 26px;
  color: #f4f6f8;
  transform: translateY(18px) scale(.97);
  opacity: 0;
  transition: transform .32s cubic-bezier(.22,1,.36,1), opacity .32s ease;
}
.sgip-overlay.sgip-open .sgip-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .sgip-overlay, .sgip-modal { transition: none !important; }
}

.sgip-modal .sgip-modal-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  background: rgba(255,255,255,.04) !important;
  color: #99a1ac !important;
  font-size: 18px !important;
  line-height: 30px !important;
  text-align: center !important;
  cursor: pointer;
  transition: all .2s;
  box-sizing: border-box !important;
}
.sgip-modal .sgip-modal-close:hover { border-color: rgba(255,255,255,.3); color: #f4f6f8; }

.sgip-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  padding-right: 30px;
}
.sgip-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Clash Grotesk', sans-serif;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.sgip-brand svg { width: 20px; height: 20px; flex: none; }
.sgip-lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 700 10.5px/1 'DM Sans', sans-serif;
  letter-spacing: .03em;
  color: #7fe9e0;
  background: rgba(47,227,216,.08);
  border: 1px solid rgba(47,227,216,.25);
  padding: 6px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.sgip-summary {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.sgip-summary-name { font-family: 'Clash Grotesk', sans-serif; font-size: 17px; margin-bottom: 2px; }
.sgip-summary-package { color: #8a919b; font-size: 12.5px; margin-bottom: 10px; }
.sgip-summary-price { font-family: 'Clash Grotesk', sans-serif; font-size: 26px; font-weight: 600; color: #c6ff4d; }
.sgip-summary-price small { font-family: 'DM Sans', sans-serif; font-size: 11px; color: #5c626c; font-weight: 500; text-transform: uppercase; margin-left: 4px; }

.sgip-pay-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sgip-pay-chip {
  font: 700 10.5px/1 'DM Sans', sans-serif;
  color: #c9cdd3;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sgip-pay-chip.sgip-visa { color: #fff; background: #1a1f71; border-color: transparent; font-style: italic; }
.sgip-pay-chip i.sgip-mc-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sgip-pay-chip .sgip-mc-r { background: #eb001b; margin-right: -4px; }
.sgip-pay-chip .sgip-mc-o { background: #f79e1b; opacity: .9; }

.sgip-panel { display: none; }
.sgip-modal[data-state="details"] .sgip-panel-details,
.sgip-modal[data-state="payment"] .sgip-panel-payment,
.sgip-modal[data-state="processing"] .sgip-panel-processing,
.sgip-modal[data-state="success"] .sgip-panel-success,
.sgip-modal[data-state="failed"] .sgip-panel-failed {
  display: block;
  animation: sgip-panel-in .32s cubic-bezier(.22,1,.36,1);
}
@keyframes sgip-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .sgip-modal .sgip-panel { animation: none !important; }
}

.sgip-field { display: block; margin-bottom: 14px; }
.sgip-field span { display: block; font: 600 12px/1 'DM Sans', sans-serif; color: #99a1ac; margin-bottom: 7px; }
.sgip-field input, .sgip-field textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 12px 14px;
  color: #f4f6f8;
  font: 500 14px/1.4 'DM Sans', sans-serif;
  transition: border-color .2s;
}
.sgip-field input:focus, .sgip-field textarea:focus {
  outline: none;
  border-color: #2fe3d8;
}

.sgip-modal .sgip-btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #c6ff4d;
  color: #06070a;
  font: 700 14.5px/1 'DM Sans', sans-serif;
  padding: 15px 20px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.22,1,.36,1), filter .3s, opacity .2s;
  margin-top: 6px;
  text-align: center;
}
.sgip-modal .sgip-btn-primary:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); }
.sgip-modal .sgip-btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.sgip-modal .sgip-btn-ghost {
  width: 100%;
  text-align: center;
  background: transparent;
  color: #8a919b;
  font: 600 13px/1 'DM Sans', sans-serif;
  padding: 12px;
  border: none;
  cursor: pointer;
  margin-top: 8px;
}
.sgip-modal .sgip-btn-ghost:hover { color: #f4f6f8; }

#sgip-payment-element { margin-bottom: 16px; }

.sgip-error {
  display: none;
  color: #ff8a9b;
  background: rgba(255,84,112,.08);
  border: 1px solid rgba(255,84,112,.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 12px;
}
.sgip-error.sgip-show { display: block; }

.sgip-panel-processing { text-align: center; padding: 30px 0 10px; }
.sgip-spinner {
  width: 42px; height: 42px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 3px solid rgba(47,227,216,.18);
  border-top-color: #2fe3d8;
  animation: sgip-spin .8s linear infinite;
}
@keyframes sgip-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sgip-spinner { animation-duration: 1.6s; }
}
.sgip-panel-processing p { color: #99a1ac; font-size: 14px; }

.sgip-panel-success, .sgip-panel-failed { text-align: center; padding: 12px 0 6px; }
.sgip-check, .sgip-x {
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  animation: sgip-pop .45s cubic-bezier(.22,1.4,.36,1);
}
@keyframes sgip-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sgip-check, .sgip-x { animation: none; } }
.sgip-check { background: rgba(198,255,77,.14); border: 1px solid rgba(198,255,77,.45); color: #c6ff4d; }
.sgip-x { background: rgba(255,84,112,.12); border: 1px solid rgba(255,84,112,.4); color: #ff5470; }
.sgip-panel-success h3, .sgip-panel-failed h3 { font-family: 'Clash Grotesk', sans-serif; font-size: 20px; margin: 0 0 8px; }
.sgip-panel-success p, .sgip-panel-failed p { color: #99a1ac; font-size: 13.5px; line-height: 1.6; margin: 0 0 4px; }
.sgip-order-ref { color: #f4f6f8 !important; font-weight: 600; }

body.sgip-modal-open { overflow: hidden; }
