/**
 * Nefix Subscription Manager - 3-Step Checkout Stylesheet
 * Matches the Vakilinoo 3-page layout with Nefix Deep Black + Glowing Orange/Amber theme.
 */

/* ==========================================================================
   Local Bundled Vazirmatn-FD WebFonts (Instant offline load, 100% Persian digits)
   ========================================================================== */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-FD-Regular.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-FD-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-FD-Medium.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-FD-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-FD-Bold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-FD-Bold.woff2') format('woff2');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

.threedlive-checkout-wrapper,
.threedlive-checkout-wrapper *,
.threedlive-checkout-wrapper button,
.threedlive-checkout-wrapper input,
.threedlive-checkout-wrapper span,
.threedlive-checkout-wrapper div {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

.threedlive-checkout-wrapper {
  min-height: 100vh;
  background-color: #090C14;
  color: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  direction: rtl;
  box-sizing: border-box;
}

.threedlive-card-shell {
  width: 100%;
  max-width: 36rem;
  background: rgba(16, 21, 34, 0.95);
  border: 1px solid rgba(255, 158, 44, 0.35);
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 138, 0, 0.08);
}

.threedlive-card-glow-tl {
  position: absolute;
  top: -6rem;
  left: -6rem;
  width: 14rem;
  height: 14rem;
  background: rgba(255, 138, 0, 0.14);
  filter: blur(80px);
  border-radius: 9999px;
  pointer-events: none;
}

.threedlive-card-glow-br {
  position: absolute;
  bottom: -6rem;
  right: -6rem;
  width: 14rem;
  height: 14rem;
  background: rgba(255, 138, 0, 0.10);
  filter: blur(80px);
  border-radius: 9999px;
  pointer-events: none;
}

.threedlive-top-header {
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

@keyframes threedlive-logo-3d-float {
  0% {
    transform: perspective(650px) translateY(0px) rotateX(4deg) rotateY(-12deg) rotateZ(-1deg) scale(1);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 18px rgba(255, 122, 0, 0.38));
  }
  25% {
    transform: perspective(650px) translateY(-5px) rotateX(9deg) rotateY(0deg) rotateZ(0.8deg) scale(1.03);
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 24px rgba(255, 165, 55, 0.52));
  }
  50% {
    transform: perspective(650px) translateY(-2px) rotateX(-4deg) rotateY(12deg) rotateZ(1.2deg) scale(1.01);
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 22px rgba(255, 122, 0, 0.45));
  }
  75% {
    transform: perspective(650px) translateY(-6px) rotateX(-7deg) rotateY(-2deg) rotateZ(-0.8deg) scale(1.03);
    filter: drop-shadow(0 15px 24px rgba(0, 0, 0, 0.82)) drop-shadow(0 0 26px rgba(255, 176, 58, 0.55));
  }
  100% {
    transform: perspective(650px) translateY(0px) rotateX(4deg) rotateY(-12deg) rotateZ(-1deg) scale(1);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 18px rgba(255, 122, 0, 0.38));
  }
}

.threedlive-logo-box {
  width: 7.5rem;
  height: 5.25rem;
  margin: 0 auto 0.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  animation: threedlive-logo-3d-float 6.5s ease-in-out infinite;
  transform-style: preserve-3d;
}

.threedlive-emblem-svg,
.threedlive-custom-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  border: none;
}

.threedlive-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 138, 0, 0.10);
  border: 1px solid rgba(255, 176, 58, 0.35);
  color: #FFD280;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.threedlive-main-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #FFFFFF;
  margin: 0.25rem 0;
}

.threedlive-gradient-text {
  background: linear-gradient(135deg, #FFE29A 0%, #FF9E2C 50%, #FF6B00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.threedlive-sub-title {
  font-size: 0.82rem;
  color: #9CA3AF;
  margin: 0.25rem 0 0;
}

.threedlive-plans-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.threedlive-plan-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1.15rem;
  margin-top: 0.85rem;
  min-height: 4.25rem;
  border-radius: 1rem;
  background: rgba(21, 27, 43, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  box-sizing: border-box;
  user-select: none;
}

.threedlive-plan-row:focus {
  outline: none;
}

.threedlive-plan-row.is-selected {
  background: linear-gradient(90deg, rgba(255, 138, 0, 0.16) 0%, rgba(21, 27, 43, 0.92) 55%, rgba(255, 138, 0, 0.10) 100%);
  border: 2px solid #FFB03A;
  box-shadow: 0 0 25px rgba(255, 138, 0, 0.22);
}

.threedlive-plan-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 auto;
  min-width: 0;
}

.threedlive-plan-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
}

.threedlive-plan-badge,
.threedlive-row-badge,
html[dir="rtl"] .threedlive-row-badge,
body.rtl .threedlive-row-badge,
.threedlive-checkout-wrapper .threedlive-row-badge,
.threedlive-checkout-wrapper .threedlive-plan-badge {
  position: absolute !important;
  top: -0.65rem !important;
  left: 1.25rem !important;
  right: auto !important;
  /*rtl:ignore*/
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  z-index: 5;
  flex-shrink: 0;
}

.threedlive-plan-badge.is-popular,
.threedlive-row-badge.is-popular {
  background: linear-gradient(135deg, #FFE29A 0%, #FF9E2C 55%, #E05300 100%);
  color: #090C14;
  box-shadow: 0 2px 10px rgba(255, 122, 0, 0.45);
}

.threedlive-plan-badge.is-value,
.threedlive-row-badge.is-value {
  background: #1B2336;
  color: #FFD280;
  border: 1px solid rgba(255, 176, 58, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.threedlive-radio-circle {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 2px solid #4B5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
}

.threedlive-radio-circle.is-checked {
  background: linear-gradient(135deg, #FFE29A 0%, #FF9E2C 55%, #E05300 100%);
  border-color: transparent;
  color: #090C14;
}

.threedlive-plan-title {
  font-size: 1rem;
  font-weight: 800;
}

.threedlive-plan-left {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.threedlive-plan-amount {
  font-size: 1.15rem;
  font-weight: 900;
}

.threedlive-toman {
  font-size: 0.75rem;
  color: #9CA3AF;
}

.threedlive-divider-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0;
}

.threedlive-divider-line {
  position: absolute;
  inset: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 176, 58, 0.35), transparent);
}

.threedlive-divider-pill {
  position: relative;
  background: #101522;
  border: 1px solid rgba(255, 176, 58, 0.35);
  color: #FFD280;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.9rem;
  border-radius: 9999px;
}

.threedlive-invoice-box {
  background: rgba(11, 15, 25, 0.92);
  border: 1px solid rgba(255, 176, 58, 0.30);
  border-radius: 1.25rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.threedlive-invoice-row,
.threedlive-payable-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.threedlive-invoice-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.threedlive-invoice-row {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.85rem;
}

.threedlive-plan-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 0.55rem;
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.threedlive-instant-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.30);
  color: #34D399;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .threedlive-invoice-box {
    padding: 0.85rem;
  }
  .threedlive-invoice-right .threedlive-muted-label {
    font-size: 0.65rem;
  }
  .threedlive-plan-pill {
    font-size: 0.68rem;
    padding: 0.18rem 0.45rem;
  }
  .threedlive-instant-pill {
    font-size: 0.62rem;
    padding: 0.18rem 0.45rem;
    gap: 0.25rem;
  }
}

.threedlive-emerald-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: #34D399;
}

.threedlive-discount-block {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.85rem;
}

.threedlive-discount-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFD280;
  margin-bottom: 0.5rem;
}

.threedlive-discount-controls {
  display: flex;
  gap: 0.5rem;
}

.threedlive-discount-input {
  flex: 1;
  background: #141A29;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0.75rem;
  padding: 0.6rem 0.85rem;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.82rem;
}

.threedlive-discount-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E5E7EB;
  border-radius: 0.75rem;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.threedlive-payable-price-box {
  background: rgba(255, 138, 0, 0.10);
  border: 1px solid rgba(255, 176, 58, 0.40);
  border-radius: 0.75rem;
  padding: 0.4rem 0.9rem;
  font-size: 1.2rem;
  font-weight: 900;
  color: #FFE29A;
}

.threedlive-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.threedlive-cta-orange {
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: 0.9rem;
  border: none;
  background: linear-gradient(135deg, #FFE29A 0%, #FF9E2C 50%, #E05300 100%);
  color: #090C14;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 138, 0, 0.30);
}

.threedlive-cta-secondary,
.threedlive-cta-retry {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  background: #141A29;
  border: 1px solid rgba(255, 176, 58, 0.25);
  color: #D1D5DB;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.threedlive-confirm-rows {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.threedlive-confirm-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #131926;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1rem;
  padding: 0.9rem 1.1rem;
}

.threedlive-confirm-box-highlight {
  border-color: rgba(255, 176, 58, 0.35);
}

.threedlive-confirm-emerald {
  color: #34D399;
  font-weight: 800;
  font-size: 0.85rem;
}

.threedlive-app-notice {
  background: rgba(255, 138, 0, 0.07);
  border: 1px solid rgba(255, 176, 58, 0.30);
  border-radius: 0.9rem;
  padding: 0.75rem 1rem;
  color: #FFD280;
  font-size: 0.75rem;
  text-align: center;
  margin-bottom: 1rem;
}

.threedlive-auth-guard-box {
  background: rgba(11, 15, 25, 0.92);
  border: 1px solid rgba(255, 176, 58, 0.35);
  border-radius: 1.15rem;
  padding: 1.5rem 1.25rem;
  margin: 1.25rem 0 1.5rem;
  text-align: center;
  box-shadow: inset 0 0 24px rgba(255, 138, 0, 0.06);
}

.threedlive-auth-guard-text {
  color: #F9FAFB;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.9;
  margin: 0;
}

.threedlive-footer-note {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.72rem;
  color: #9CA3AF;
}

@media (max-width: 480px) {
  .threedlive-card-shell {
    padding: 1.25rem 0.85rem;
    border-radius: 1.25rem;
  }
  .threedlive-invoice-box {
    padding: 0.85rem 0.65rem;
  }
  .threedlive-invoice-row {
    flex-wrap: nowrap;
    gap: 0.25rem;
    justify-content: space-between;
  }
  .threedlive-invoice-right {
    gap: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .threedlive-muted-label {
    font-size: 0.68rem;
  }
  .threedlive-plan-pill {
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .threedlive-instant-pill {
    font-size: 0.64rem;
    padding: 0.2rem 0.45rem;
    gap: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .threedlive-plan-row {
    padding: 1.15rem 1rem 1.05rem;
    margin-top: 0.75rem;
    min-height: 4rem;
  }
  .threedlive-plan-title {
    font-size: 0.88rem;
  }
  .threedlive-plan-amount {
    font-size: 1.02rem;
  }
  .threedlive-plan-badge,
  .threedlive-row-badge,
  html[dir="rtl"] .threedlive-row-badge,
  body.rtl .threedlive-row-badge,
  .threedlive-checkout-wrapper .threedlive-row-badge,
  .threedlive-checkout-wrapper .threedlive-plan-badge {
    position: absolute !important;
    top: -0.62rem !important;
    left: 1rem !important;
    right: auto !important;
    /*rtl:ignore*/
    font-size: 0.64rem;
    padding: 0.16rem 0.55rem;
    z-index: 5;
  }
  .threedlive-logo-box {
    width: 6.5rem;
    height: 4.5rem;
  }
}
