/* ============================================================
   MODEL.CSS — SEBI Research Analyst Institutional Payment & Onboarding Modal
   Theme: Apex RA Website (Deep Navy #0A1F3D, Royal Gold #C6A664, Cream Sand #FAF6EF)
   ============================================================ */

/* ── 1. Modal Backdrop ── */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 21, 43, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.bottom-sheet-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ── 2. Centered Floating Modal Dialog ── */
.bottom-sheet {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.97);
  width: 92%;
  max-width: 620px;
  max-height: 90vh;
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #E2D7C3;
  box-shadow: 0 25px 60px -15px rgba(10, 31, 61, 0.38), 0 0 0 1px rgba(198, 166, 100, 0.25);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}

.bottom-sheet.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

/* Hide mobile pull handle on desktop */
.bottom-sheet__handle-bar {
  display: none;
}

/* ── 3. Gateway Header ── */
.bottom-sheet__header {
  padding: 18px 24px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #E2D7C3;
  background: #FFFFFF;
  flex-shrink: 0;
}

.bottom-sheet__title-group {
  flex: 1;
  padding-right: 16px;
}

.bottom-sheet__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #917231;
  background: #FAF3E8;
  border: 1px solid #EBDBC3;
  padding: 2.5px 8.5px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.bottom-sheet__eyebrow svg {
  color: #917231;
}

.bottom-sheet__title {
  font-family: var(--font-display, 'Outfit', 'Inter', sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0A1F3D;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
}

.bottom-sheet__subtitle {
  font-size: 0.825rem;
  color: #64748B;
  margin: 3px 0 0;
  line-height: 1.35;
}

.bottom-sheet__close {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.bottom-sheet__close:hover {
  background: #FEE2E2;
  border-color: #FECACA;
  color: #DC2626;
  transform: rotate(90deg);
}

/* ── 4. Stepper Track ── */
.bottom-sheet__steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: #FAF6EF;
  border-bottom: 1px solid #E2D7C3;
  flex-shrink: 0;
}

.bottom-sheet__step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #727D91;
  position: relative;
  z-index: 2;
  cursor: default;
}

.bottom-sheet__step-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid #E2D7C3;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.bottom-sheet__step-item.is-active {
  color: #0A1F3D;
  font-weight: 700;
}

.bottom-sheet__step-item.is-active .bottom-sheet__step-circle {
  background: #0A1F3D;
  border-color: #C6A664;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(10, 31, 61, 0.25);
}

.bottom-sheet__step-item.is-completed {
  color: #0D683A;
}

.bottom-sheet__step-item.is-completed .bottom-sheet__step-circle {
  background: #10874D;
  border-color: #10874D;
  color: #FFFFFF;
}

.bottom-sheet__step-line {
  flex: 1;
  height: 2px;
  background: #E2D7C3;
  margin: 0 6px;
  transition: background 0.25s ease;
}

.bottom-sheet__step-line.is-active {
  background: #10874D;
}

/* ── 5. Selected Plan Summary Card ── */
.bottom-sheet__plan-summary {
  margin: 14px 24px 0;
  padding: 11px 16px;
  background: linear-gradient(135deg, #FAF6EF 0%, #F6EFE2 100%);
  border: 1px solid #E2D7C3;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.bottom-sheet__plan-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bottom-sheet__plan-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #0A1F3D;
  color: #C6A664;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bottom-sheet__plan-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0A1F3D;
  margin-bottom: 1px;
}

.bottom-sheet__plan-price {
  font-size: 0.8rem;
  color: #64748B;
  font-weight: 500;
}

.bottom-sheet__plan-change {
  font-size: 0.8rem;
  color: #917231;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
}

.bottom-sheet__plan-change:hover {
  color: #0A1F3D;
}

/* ── 6. Form Body & Grid ── */
.bottom-sheet__body {
  padding: 16px 24px 20px;
  overflow-y: auto;
  max-height: calc(90vh - 180px);
}

.bottom-sheet__body::-webkit-scrollbar {
  width: 5px;
}

.bottom-sheet__body::-webkit-scrollbar-track {
  background: transparent;
}

.bottom-sheet__body::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

.bottom-sheet__step-pane {
  display: none;
}

.bottom-sheet__step-pane.is-active {
  display: block;
  animation: fadeInPane 0.25s ease-out;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bottom-sheet__form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.bottom-sheet__form-group--full {
  grid-column: 1 / -1;
}

.bottom-sheet__label {
  display: flex;
  align-items: center;
  font-size: 0.825rem;
  font-weight: 700;
  color: #0A1F3D;
  margin-bottom: 5px;
}

.bottom-sheet__required {
  color: #DC2626;
  margin-left: 3px;
}

.bottom-sheet__input,
.bottom-sheet__select {
  width: 100%;
  padding: 10px 13px;
  font-size: 0.9rem;
  color: #0F172A;
  background: #FFFFFF;
  border: 1.5px solid #E2D7C3;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.bottom-sheet__input:focus,
.bottom-sheet__select:focus {
  border-color: #C6A664;
  box-shadow: 0 0 0 3px rgba(198, 166, 100, 0.2);
}

/* ── 7. Step 2: Agreement & Digital Signature ── */
.bottom-sheet__agreement-viewer {
  background: #FAF6EF;
  border: 1px solid #E2D7C3;
  border-radius: 10px;
  padding: 14px 16px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.8rem;
  color: #3E4756;
  line-height: 1.55;
  margin-bottom: 14px;
}

.bottom-sheet__signature-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.bottom-sheet__sig-tab-btn {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid #E2D7C3;
  background: #FFFFFF;
  color: #64748B;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bottom-sheet__sig-tab-btn.active {
  background: #0A1F3D;
  border-color: #0A1F3D;
  color: #FFFFFF;
}

.bottom-sheet__sig-preview-type {
  font-family: 'Brush Script MT', cursive, sans-serif;
  font-size: 1.6rem;
  color: #0A1F3D;
  background: #FAF6EF;
  border: 1px dashed #C6A664;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.bottom-sheet__signature-pad-wrap {
  position: relative;
  background: #FAF6EF;
  border: 1px dashed #C6A664;
  border-radius: 8px;
}

.bottom-sheet__sig-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #FFFFFF;
  border: 1px solid #E2D7C3;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.bottom-sheet__compliance-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: #3E4756;
  cursor: pointer;
}

/* ── 8. Step 3: Aadhaar OTP Verification ── */
.bottom-sheet__aadhaar-card {
  background: #FAF6EF;
  border: 1px solid #E2D7C3;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.bottom-sheet__uidai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.bottom-sheet__uidai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0D683A;
  background: #E2F5EB;
  padding: 2px 7px;
  border-radius: 4px;
}

.bottom-sheet__otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0;
}

.bottom-sheet__otp-digit {
  width: 40px;
  height: 44px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  border: 1.5px solid #E2D7C3;
  border-radius: 8px;
  outline: none;
  background: #FFFFFF;
}

.bottom-sheet__otp-digit:focus {
  border-color: #C6A664;
  box-shadow: 0 0 0 3px rgba(198, 166, 100, 0.2);
}

.bottom-sheet__aadhaar-verified-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #E2F5EB;
  border: 1px solid #A7F3D0;
  color: #0D683A;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
}

/* ── 9. Step 4: Payment View (Matching Reference Design in RA Theme) ── */
.pay-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.pay-screen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pay-screen__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0A1F3D 0%, #1E3A8A 50%, #C6A664 100%);
  box-shadow: 0 4px 12px rgba(10, 31, 61, 0.2);
  flex-shrink: 0;
}

.pay-screen__user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.pay-screen__user-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

.pay-screen__total-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0A1F3D;
  letter-spacing: -0.02em;
  margin-top: 1px;
}

.pay-screen__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0A1F3D;
  margin: 0 0 12px 0;
}

.pay-screen__title-highlight {
  color: #917231;
}

.pay-screen__box {
  background: #FAF6EF;
  border: 1px solid #E2D7C3;
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 12px;
}

.pay-screen__qr-wrap {
  width: 155px;
  height: 155px;
  background: #FFFFFF;
  border: 1px solid #E2D7C3;
  border-radius: 10px;
  padding: 8px;
  margin: 0 auto 10px;
  box-shadow: 0 4px 12px rgba(10, 31, 61, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-screen__qr-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pay-screen__caption {
  font-size: 11.5px;
  color: #64748B;
  text-align: center;
  margin: 0 auto 14px;
  line-height: 1.4;
  max-width: 280px;
}

.pay-screen__table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-screen__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.pay-screen__col-left {
  display: flex;
  flex-direction: column;
}

.pay-screen__col-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.pay-screen__label {
  font-size: 10.5px;
  font-weight: 600;
  color: #727D91;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pay-screen__value-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pay-screen__value {
  font-size: 13px;
  font-weight: 700;
  color: #0A1F3D;
  font-family: monospace;
}

.pay-screen__copy-icon {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: #917231;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.pay-screen__copy-icon:hover {
  color: #0A1F3D;
  transform: scale(1.15);
}

.pay-screen__timer {
  font-size: 13px;
  font-weight: 700;
  color: #0A1F3D;
  font-family: monospace;
}

.pay-screen__divider {
  height: 1px;
  background: #E2D7C3;
  margin: 8px 0;
}

.pay-screen__notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #917231;
  margin-bottom: 12px;
  text-align: center;
}

.pay-screen__utr-wrap {
  margin-bottom: 10px;
}

.pay-screen__utr-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 13.5px;
  font-family: monospace;
  color: #0A1F3D;
  background: #FFFFFF;
  border: 1.5px solid #E2D7C3;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.pay-screen__utr-input:focus {
  border-color: #C6A664;
  box-shadow: 0 0 0 3px rgba(198, 166, 100, 0.2);
}

.pay-screen__confirm-btn {
  width: 100%;
  padding: 13px 20px;
  background: #0A1F3D;
  border: none;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(10, 31, 61, 0.25);
}

.pay-screen__confirm-btn:hover:not(:disabled) {
  background: #113160;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 31, 61, 0.35);
}

.pay-screen__confirm-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.pay-screen__back-btn {
  width: 100%;
  padding: 10px 18px;
  background: #FFFFFF;
  border: 1.5px solid #E2D7C3;
  color: #3E4756;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  text-align: center;
}

.pay-screen__back-btn:hover {
  background: #FAF6EF;
  border-color: #C6A664;
  color: #0A1F3D;
}

/* ── 10. Wizard Actions (Steps 1-3) ── */
.bottom-sheet__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.bottom-sheet__back-btn {
  padding: 10px 18px;
  background: #FFFFFF;
  border: 1.5px solid #E2D7C3;
  color: #3E4756;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bottom-sheet__back-btn:hover {
  background: #FAF6EF;
  color: #0A1F3D;
  border-color: #C6A664;
}

.bottom-sheet__next-btn {
  flex: 1;
  padding: 11px 20px;
  background: #0A1F3D;
  border: 1.5px solid #0A1F3D;
  color: #FFFFFF;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(10, 31, 61, 0.2);
}

.bottom-sheet__next-btn:hover:not(:disabled) {
  background: #113160;
  border-color: #113160;
  transform: translateY(-1px);
}

/* ── 11. Gateway Security Trust Footer ── */
.bottom-sheet__gateway-footer {
  padding: 10px 24px;
  background: #FAF6EF;
  border-top: 1px solid #E2D7C3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.bottom-sheet__trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
}

.bottom-sheet__trust-pill svg {
  color: #917231;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ── 12. Success View ── */
.bottom-sheet__success {
  text-align: center;
  padding: 24px 20px 20px;
}

.bottom-sheet__success-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #E2F5EB;
  color: #10874D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 14px;
}

.bottom-sheet__success-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0A1F3D;
  margin-bottom: 8px;
}

.bottom-sheet__success-desc {
  font-size: 0.88rem;
  color: #3E4756;
  line-height: 1.5;
  margin-bottom: 18px;
}

.bottom-sheet__ref-box {
  background: #FAF6EF;
  border: 1px dashed #C6A664;
  border-radius: 8px;
  padding: 10px 14px;
  display: inline-block;
  margin-bottom: 18px;
}

.bottom-sheet__ref-label {
  font-size: 0.72rem;
  color: #727D91;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.bottom-sheet__ref-code {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0A1F3D;
  font-family: monospace;
}

/* ── 13. Mobile Responsiveness ── */
@media (max-width: 640px) {
  .bottom-sheet {
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(105%);
    width: 100%;
    max-width: 100%;
    max-height: 96vh;
    border-radius: 20px 20px 0 0;
  }

  .bottom-sheet.active {
    transform: translateX(-50%) translateY(0);
  }

  .bottom-sheet__handle-bar {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 8px 0 4px;
    background: #FFFFFF;
  }

  .bottom-sheet__handle {
    width: 40px;
    height: 4px;
    border-radius: 9999px;
    background: rgba(10, 31, 61, 0.15);
  }

  .bottom-sheet__header {
    padding: 12px 18px;
  }

  .bottom-sheet__steps-bar {
    padding: 8px 16px;
  }

  .bottom-sheet__step-item span {
    display: none;
  }

  .bottom-sheet__body {
    padding: 14px 16px 20px;
    max-height: calc(96vh - 170px);
  }

  .bottom-sheet__plan-summary {
    margin: 8px 16px 0;
  }

  .bottom-sheet__form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
