/* =============================================
   Registration Modal & Success Modal Styles
   Prefix: tw- (TechWise custom)
   ============================================= */

/* Magnific Popup fade transition (not included by default) */
.mfp-fade.mfp-bg {
  opacity: 0;
  transition: all 0.3s ease-out;
}
.mfp-fade.mfp-bg.mfp-ready {
  opacity: 0.92;
}
.mfp-fade.mfp-bg.mfp-removing {
  opacity: 0;
}
.mfp-fade.mfp-wrap .mfp-content {
  opacity: 0;
  transition: all 0.3s ease-out;
}
.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
  opacity: 1;
}
.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
  opacity: 0;
}

/* Override magnific popup bg for dark theme */
.mfp-bg {
  background: #0d0d0d;
}

/* ---- Modal Container ---- */
.tw-modal {
  position: relative;
  max-width: 520px;
  margin: 40px auto;
  background: #111112;
  border-radius: 16px;
  padding: 40px 36px;
  color: #fff;
  font-family: var(--tp-ff-dm), 'DM Sans', sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tw-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.25s ease;
  line-height: 1;
}
.tw-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ---- Program Info Card ---- */
.tw-program-badge {
  display: inline-block;
  background: rgba(196, 238, 24, 0.12);
  color: var(--tp-theme-primary, #c4ee18);
  font-family: var(--tp-ff-heading), 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.tw-program-name {
  font-family: var(--tp-ff-heading), 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.3;
}

.tw-program-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.tw-program-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.tw-program-detail svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--tp-theme-primary, #c4ee18);
}

.tw-program-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 20px;
}

.tw-program-price {
  font-family: var(--tp-ff-heading), 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--tp-theme-primary, #c4ee18);
  margin-bottom: 4px;
}

.tw-program-price-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 24px;
}

.tw-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 24px 0;
}

/* ---- Form Styles ---- */
.tw-form-title {
  font-family: var(--tp-ff-heading), 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.tw-form-group {
  margin-bottom: 16px;
}

.tw-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tw-form-input {
  width: 100%;
  height: 52px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 16px;
  font-family: var(--tp-ff-dm), 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  outline: none;
}

.tw-form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.tw-form-input:focus {
  border-color: var(--tp-theme-primary, #c4ee18);
  background: rgba(255, 255, 255, 0.06);
}

.tw-form-input.tw-input-error {
  border-color: #ff4d4d;
}

.tw-error-msg {
  display: none;
  font-size: 12px;
  color: #ff4d4d;
  margin-top: 5px;
}

.tw-error-msg.tw-visible {
  display: block;
}

/* ---- CTA Button ---- */
.tw-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  background: var(--tp-theme-primary, #c4ee18);
  color: #030303;
  border: none;
  border-radius: 26px;
  font-family: var(--tp-ff-heading), 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 24px;
}

.tw-btn-submit:hover {
  background: #d4f53a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196, 238, 24, 0.2);
}

.tw-btn-submit:active {
  transform: translateY(0);
}

.tw-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tw-btn-submit svg {
  transition: transform 0.3s ease;
}

.tw-btn-submit:hover svg {
  transform: translateX(3px);
}

.tw-stripe-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

.tw-stripe-note svg {
  width: 14px;
  height: 14px;
}

/* ---- Success Modal ---- */
.tw-success-modal {
  text-align: center;
  max-width: 460px;
}

.tw-checkmark-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(196, 238, 24, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tw-checkmark-svg {
  width: 40px;
  height: 40px;
}

.tw-checkmark-circle {
  stroke: var(--tp-theme-primary, #c4ee18);
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  fill: none;
  animation: tw-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.tw-checkmark-check {
  stroke: var(--tp-theme-primary, #c4ee18);
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: tw-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes tw-stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

.tw-success-title {
  font-family: var(--tp-ff-heading), 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.tw-success-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 8px;
}

.tw-success-email-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 24px;
}

.tw-success-details {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tw-success-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.tw-success-detail-row + .tw-success-detail-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tw-success-detail-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tw-success-detail-value {
  font-family: var(--tp-ff-heading), 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.tw-btn-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 36px;
  background: var(--tp-theme-primary, #c4ee18);
  color: #030303;
  border: none;
  border-radius: 26px;
  font-family: var(--tp-ff-heading), 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.tw-btn-home:hover {
  background: #d4f53a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196, 238, 24, 0.2);
  color: #030303;
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
  .tw-modal {
    margin: 20px 16px;
    padding: 28px 20px;
    border-radius: 12px;
  }

  .tw-program-name {
    font-size: 20px;
  }

  .tw-program-price {
    font-size: 26px;
  }

  .tw-success-title {
    font-size: 24px;
  }

  .tw-btn-submit,
  .tw-btn-home {
    height: 50px;
    font-size: 14px;
  }
}

/* Magnific Popup scrollable fix */
.mfp-wrap {
  overflow-y: auto;
}
