/* ================================================================
   REGISTRATION.MOBILE.CSS — Mobile Registration Responsive Styles
   Bihar Vidyalaya Adhyapak Mahasangh (STFBIHAR)
   ================================================================ */

@media (max-width: 768px) {
  /* Prevent body horizontal overflow */
  html, body {
    overflow-x: hidden !important;
  }

  /* Hero Section */
  .reg-hero {
    padding: 3rem 1rem 2.25rem !important;
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
    text-align: center !important;
  }

  .reg-hero h1 {
    font-size: 1.45rem !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
  }

  .reg-hero p {
    font-size: 0.88rem !important;
    opacity: 0.95 !important;
    line-height: 1.5 !important;
    margin-top: 0.4rem !important;
  }

  /* Main Container & Card */
  .reg-container {
    margin-top: -1.25rem !important;
    padding: 0 0.75rem !important;
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .reg-card {
    padding: 1.25rem 0.9rem !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.12) !important;
    border: 1px solid rgba(2, 132, 199, 0.18) !important;
    background: #ffffff !important;
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
  }

  /* Section Titles */
  .reg-section-title {
    font-size: 1rem !important;
    gap: 0.6rem !important;
    margin-bottom: 1rem !important;
    margin-top: 1.25rem !important;
    padding-bottom: 0.6rem !important;
    border-bottom: 2px solid #E2E8F0 !important;
    line-height: 1.3 !important;
  }

  .reg-section-title:first-child {
    margin-top: 0.25rem !important;
  }

  .reg-section-title .icon-badge {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.05rem !important;
    flex-shrink: 0 !important;
    background: #F0F9FF !important;
    color: #0284C7 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Form Layout Grid */
  .reg-grid {
    grid-template-columns: 1fr !important;
    gap: 0.9rem !important;
  }

  /* Form Control & Labels — Optimized for Touch & Mobile View */
  .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
    width: 100% !important;
    position: relative !important;
    z-index: 5 !important;
  }

  .form-group label {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #1E293B !important;
    display: block !important;
    margin-bottom: 0.15rem !important;
  }

  .form-control {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important; /* Minimum 16px to prevent iOS Safari auto-zoom */
    min-height: 48px !important; /* Touch hit target minimum height */
    padding: 0.75rem 0.9rem !important;
    border-radius: 10px !important;
    border: 1.5px solid #CBD5E1 !important;
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    position: relative !important;
    z-index: 5 !important;
    pointer-events: auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  }

  .form-control:focus {
    outline: none !important;
    border-color: #0284C7 !important;
    box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.2) !important;
    background-color: #F0F9FF !important;
  }

  /* Select Elements Custom Arrow */
  select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230284C7'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 1.2rem !important;
    padding-right: 2.75rem !important;
    cursor: pointer !important;
  }

  /* Date Input Styling */
  input[type="date"].form-control {
    min-height: 48px !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
  }

  /* File Input Styling */
  input[type="file"].form-control {
    padding: 0.6rem 0.8rem !important;
    min-height: 48px !important;
    font-size: 0.88rem !important;
    cursor: pointer !important;
  }

  /* Submit Button */
  .reg-submit-btn {
    width: 100% !important;
    min-height: 52px !important;
    padding: 0.95rem 1rem !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.3 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    position: relative !important;
    z-index: 5 !important;
    pointer-events: auto !important;
  }

  .reg-submit-btn:active {
    transform: scale(0.98) !important;
    background: #0369A1 !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.25) !important;
  }

  /* Modal & Dialog Popups */
  .success-modal-card {
    width: 92% !important;
    max-width: 440px !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    padding: 1.25rem 1rem !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
  }

  .summary-grid {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }

  .success-modal-actions {
    flex-direction: column !important;
    gap: 0.6rem !important;
  }

  .btn-primary-action, .btn-secondary-action {
    width: 100% !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.98rem !important;
    font-weight: 600 !important;
  }

  /* Receipt Layout */
  .receipt-grid {
    grid-template-columns: 1fr !important;
    padding: 0.85rem !important;
  }

  /* Payment Step Modal Mobile Layout */
  #paymentStepModal {
    padding: 10px 5px !important;
  }

  #paymentStepModal > div {
    margin: 10px auto !important;
    width: 96% !important;
    border-radius: 16px !important;
  }

  #paymentStepModal div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #paymentStepModal h3 {
    font-size: 1.1rem !important;
  }

  #confirmPaymentBtn {
    font-size: 0.92rem !important;
    padding: 12px 10px !important;
    min-height: 48px !important;
  }
}

/* ================================================================
   MEMBERSHIP PAYMENT SECTION (MOBILE)
   ================================================================ */
.membership-payment-section {
  padding: 2.5rem 1rem;
  background-color: var(--color-bg-alt, #fafafa);
  border-top: 1px solid var(--color-border-light, #E2E8F0);
}

.membership-payment-section .section-title h2 {
  font-family: var(--font-primary, sans-serif);
  color: var(--color-primary, #0284C7);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.membership-payment-section .section-title p {
  color: var(--color-text-light, #64748B);
  font-size: 0.92rem;
  line-height: 1.45;
}

.payment-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.payment-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  padding: 1.5rem 1.25rem;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid transparent;
}

.card-header h3 {
  font-size: 1.2rem;
  color: var(--color-text, #0F172A);
  margin-bottom: 0.2rem;
}

.card-header p {
  color: var(--color-primary, #0284C7);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.card-price {
  display: flex;
  align-items: baseline;
  margin-bottom: 1.25rem;
  color: var(--color-text, #0F172A);
}

.card-price .currency {
  font-size: 1.2rem;
  font-weight: 600;
  margin-right: 4px;
}

.card-price .amount {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary, #0284C7);
}

.card-price .period {
  color: var(--color-text-light, #64748B);
  font-weight: 500;
  margin-left: 6px;
  font-size: 0.88rem;
}

.card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
}

.card-features li {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--color-text, #0F172A);
  font-size: 0.92rem;
}

.card-features .icon {
  color: #10b981;
  font-weight: bold;
  margin-right: 8px;
  font-size: 1.05rem;
}

.card-total {
  background: var(--color-bg-alt, #f8f9fa);
  padding: 0.88rem;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--color-border-light, #E2E8F0);
}

.card-total span {
  font-weight: 600;
  color: var(--color-text-light, #64748B);
  font-size: 0.88rem;
}

.card-total strong {
  font-size: 1.15rem;
  color: var(--color-primary, #0284C7);
}

.yearly-card {
  border: 2px solid var(--color-border-light, #E2E8F0);
}
