/* ============================================================
   MODEL.CSS — Premium Bottom Sheet & Inquiry Modal
   SEBI Research Analyst Platform Style & Theme
   ============================================================ */

/* ── Modal Backdrop ── */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 21, 43, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  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;
}

/* ── Bottom Sheet Drawer Container ── */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(105%);
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  background: var(--color-bg, #FAF6EF);
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(198, 166, 100, 0.35);
  border-bottom: none;
  box-shadow: 0 -12px 40px rgba(6, 21, 43, 0.25);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow: hidden;
}

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

/* ── Drag / Pull Handle ── */
.bottom-sheet__handle-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
}

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

/* ── Bottom Sheet Header ── */
.bottom-sheet__header {
  padding: 12px 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border, #E2D7C3);
  background: #FDFBF7;
}

.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: var(--color-accent-700, #917231);
  background: var(--color-accent-100, #F7EFE0);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.bottom-sheet__title {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-900, #0A1F3D);
  line-height: 1.3;
  margin: 0 0 4px;
}

.bottom-sheet__subtitle {
  font-size: 0.85rem;
  color: var(--color-text-body, #3E4756);
  margin: 0;
  line-height: 1.4;
}

.bottom-sheet__close {
  background: rgba(10, 31, 61, 0.06);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-900, #0A1F3D);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  line-height: 1;
}

.bottom-sheet__close:hover {
  background: rgba(179, 38, 30, 0.1);
  color: #B3261E;
}

/* ── Selected Plan Summary Banner ── */
.bottom-sheet__plan-summary {
  margin: 16px 24px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(10, 31, 61, 0.04), rgba(198, 166, 100, 0.08));
  border: 1px solid rgba(198, 166, 100, 0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

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

.bottom-sheet__plan-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--color-primary-900, #0A1F3D);
  color: var(--color-accent-400, #D8BD80);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.bottom-sheet__plan-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary-900, #0A1F3D);
  margin-bottom: 2px;
}

.bottom-sheet__plan-price {
  font-size: 0.8rem;
  color: var(--color-text-muted, #727D91);
}

.bottom-sheet__plan-change {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary-800, #113160);
  text-decoration: underline;
  cursor: pointer;
}

/* ── Form Scrollable Body ── */
.bottom-sheet__body {
  padding: 16px 24px 24px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* ── Form Elements Matching Platform Style ── */
.bottom-sheet__form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.bottom-sheet__form-group {
  display: flex;
  flex-direction: column;
}

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

.bottom-sheet__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary-900, #0A1F3D);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bottom-sheet__required {
  color: #B3261E;
}

.bottom-sheet__input,
.bottom-sheet__select,
.bottom-sheet__textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--color-text-primary, #0C1322);
  background: #FFFFFF;
  border: 1px solid var(--color-border, #E2D7C3);
  border-radius: var(--radius-sm, 6px);
  transition: all 0.2s ease;
  outline: none;
}

.bottom-sheet__input:focus,
.bottom-sheet__select:focus,
.bottom-sheet__textarea:focus {
  border-color: var(--color-primary-800, #113160);
  box-shadow: 0 0 0 3px rgba(10, 31, 61, 0.08);
}

.bottom-sheet__textarea {
  resize: vertical;
  min-height: 70px;
}

/* Radio / Pill Groups */
.bottom-sheet__pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bottom-sheet__pill-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--color-border, #E2D7C3);
  border-radius: 9999px;
  background: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-body, #3E4756);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bottom-sheet__pill-label:hover {
  background: #F6EFE2;
}

.bottom-sheet__pill-input {
  display: none;
}

.bottom-sheet__pill-input:checked + .bottom-sheet__pill-label {
  background: var(--color-primary-900, #0A1F3D);
  border-color: var(--color-primary-900, #0A1F3D);
  color: #FFFFFF;
  font-weight: 600;
}

/* Compliance Checkbox */
.bottom-sheet__compliance-box {
  background: #F6EFE2;
  border: 1px solid var(--color-border, #E2D7C3);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.76rem;
  color: var(--color-text-body, #3E4756);
  line-height: 1.45;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 4px;
}

.bottom-sheet__compliance-box input {
  margin-top: 3px;
  accent-color: var(--color-primary-900, #0A1F3D);
}

/* Submit Action Button */
.bottom-sheet__submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--color-primary-900, #0A1F3D);
  border: 2px solid var(--color-primary-900, #0A1F3D);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  box-shadow: 0 4px 14px rgba(10, 31, 61, 0.15);
}

.bottom-sheet__submit-btn:hover:not(:disabled) {
  background: var(--color-primary-800, #113160);
  border-color: var(--color-primary-800, #113160);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 31, 61, 0.2);
}

.bottom-sheet__submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

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

.bottom-sheet__success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-emerald-100, #E2F5EB);
  color: var(--color-emerald-600, #10874D);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}

.bottom-sheet__success-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary-900, #0A1F3D);
  margin-bottom: 8px;
}

.bottom-sheet__success-desc {
  font-size: 0.9rem;
  color: var(--color-text-body, #3E4756);
  line-height: 1.5;
  margin-bottom: 20px;
}

.bottom-sheet__ref-box {
  background: #FDFBF7;
  border: 1px dashed rgba(198, 166, 100, 0.6);
  border-radius: 6px;
  padding: 12px;
  display: inline-block;
  margin-bottom: 20px;
}

.bottom-sheet__ref-label {
  font-size: 0.75rem;
  color: var(--color-text-muted, #727D91);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.bottom-sheet__ref-code {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary-900, #0A1F3D);
  font-family: monospace;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .bottom-sheet {
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }

  .bottom-sheet__header {
    padding: 10px 16px 14px;
  }

  .bottom-sheet__body {
    padding: 14px 16px 20px;
  }

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

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