/* ==========================================================================
   FAREGRAM SELECTION SHEET SYSTEM (FaregramSelectionSheet)
   Unified, Symmetrical Bottom Sheets for Travellers, Cabin & Fare Preferences
   WCAG 2.2 AA Compliant · Mobile-First · Safe-Area Isolated
   ========================================================================== */

/* 1. Global Navigation & Distraction Suppression */
body.modal-open .traveller-bottom-navigation-wrapper,
body.modal-open .fg-app-fixed-bottom-bar,
body.modal-open .fg-bottom-center-plan-bubble,
body.modal-open .faregram-whatsapp-fab,
body.fg-sheet-open .traveller-bottom-navigation-wrapper,
body.fg-sheet-open .fg-app-fixed-bottom-bar,
body.fg-sheet-open .fg-bottom-center-plan-bubble,
body.fg-sheet-open .faregram-whatsapp-fab {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 2. Sheet Geometry & Mobile Bottom-Sheet */
.fg-selection-sheet .modal-dialog {
  margin: 0;
  max-width: 100%;
}

@media (max-width: 767px) {
  .fg-selection-sheet .modal-dialog {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .fg-selection-sheet.show .modal-dialog {
    transform: translateY(0);
  }

  .fg-selection-sheet .modal-content {
    border-radius: 28px 28px 0 0 !important;
    border: none;
    max-height: min(88dvh, calc(100dvh - env(safe-area-inset-top) - 12px));
    height: auto;
    background: #FFFFFF;
    box-shadow: 0 -10px 40px rgba(7, 31, 51, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
}

@media (min-width: 768px) {
  .fg-selection-sheet .modal-dialog {
    max-width: 520px;
    margin: 2.5rem auto;
  }

  .fg-selection-sheet .modal-content {
    border-radius: 24px !important;
    border: 1px solid #E5EEF5;
    background: #FFFFFF;
    box-shadow: 0 20px 50px rgba(7, 31, 51, 0.22);
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
}

/* 3. Drag Handle & Header */
.fg-sheet-drag-handle {
  width: 48px;
  height: 5px;
  border-radius: 3px;
  background: #CBD5E1;
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.fg-sheet-header {
  padding: 8px 18px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #F1F5F9;
  flex-shrink: 0;
  gap: 12px;
}

.fg-sheet-title-group {
  flex: 1;
}

.fg-sheet-title {
  font-size: 22px;
  font-weight: 700;
  color: #071F33;
  margin: 0 0 3px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.fg-sheet-subtext {
  font-size: 13.5px;
  color: #596575;
  line-height: 1.4;
  margin: 0;
}

.fg-sheet-close-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #596575;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.fg-sheet-close-btn:hover {
  background: #F1F5F9;
  color: #071F33;
}

.fg-sheet-close-btn:focus-visible {
  outline: 2px solid #0078F3;
  outline-offset: 1px;
}

/* 4. Scrollable Body */
.fg-sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px;
}

/* 5. Sticky Action Footer */
.fg-sheet-footer {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid #EBF0F5;
  padding: 12px 18px max(16px, env(safe-area-inset-bottom));
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}

.fg-sheet-footer-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fg-sheet-footer-primary-text {
  font-size: 15px;
  font-weight: 700;
  color: #071F33;
  line-height: 1.25;
}

.fg-sheet-footer-secondary-text {
  font-size: 12.5px;
  color: #596575;
  font-weight: 500;
  line-height: 1.3;
}

.fg-sheet-action-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-fg-sheet-cancel {
  flex: 2;
  height: 52px;
  border-radius: 14px;
  background: #F1F5F9;
  color: #334155;
  font-size: 15.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-fg-sheet-cancel:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.btn-fg-sheet-apply {
  flex: 3;
  height: 52px;
  border-radius: 14px;
  background: #0078F3;
  color: #FFFFFF;
  font-size: 15.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 120, 243, 0.28);
  transition: all 0.15s ease;
}

.btn-fg-sheet-apply:hover {
  background: #006CE0;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 120, 243, 0.35);
}

.btn-fg-sheet-apply:active {
  transform: translateY(0);
}

/* ==========================================================================
   TRAVELLER COUNTER ROWS
   ========================================================================== */
.fg-traveller-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-bottom: 1px solid #F1F5F9;
  min-height: 78px;
}

.fg-traveller-item-row:last-child {
  border-bottom: none;
}

.fg-traveller-meta-col {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.fg-traveller-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fg-traveller-icon-circle.fg-icon-adults {
  background: #EFF6FF;
  color: #0078F3;
}

.fg-traveller-icon-circle.fg-icon-children {
  background: #ECFDF5;
  color: #10B981;
}

.fg-traveller-icon-circle.fg-icon-infants-lap {
  background: #FFFBEB;
  color: #F59E0B;
}

.fg-traveller-icon-circle.fg-icon-infants-seat {
  background: #EEF2FF;
  color: #6366F1;
}

.fg-traveller-text-wrap {
  display: flex;
  flex-direction: column;
}

.fg-traveller-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #071F33;
  margin: 0;
  line-height: 1.25;
}

.fg-traveller-subtext {
  font-size: 12px;
  color: #64748B;
  margin: 2px 0 0;
  line-height: 1.35;
}

/* Symmetrical Counter Block */
.fg-counter-ctrl-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.fg-counter-btn-minus,
.fg-counter-btn-plus {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #D9E0E7;
  background: #FFFFFF;
  color: #071F33;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.fg-counter-btn-plus {
  border-color: #0078F3;
  background: #F0F7FF;
  color: #0078F3;
}

.fg-counter-btn-minus:hover:not(:disabled),
.fg-counter-btn-plus:hover:not(:disabled) {
  transform: scale(1.04);
}

.fg-counter-btn-minus:disabled,
.fg-counter-btn-plus:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #E2E8F0;
  background: #F8FAFC;
  color: #94A3B8;
  transform: none;
}

.fg-counter-val-display {
  width: 36px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #071F33;
}

/* Group Travel Conditional Transition Card */
.fg-sheet-group-banner {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fg-sheet-group-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fg-sheet-group-banner-desc {
  font-size: 12.5px;
  color: #78350F;
  line-height: 1.4;
  margin: 0;
}

.btn-fg-group-request {
  align-self: flex-start;
  padding: 8px 14px;
  background: #D97706;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.btn-fg-group-request:hover {
  background: #B45309;
  color: #FFFFFF;
}

/* ==========================================================================
   CABIN & FARE SELECTION ROWS
   ========================================================================== */
.fg-choice-row-card {
  min-height: 84px;
  border: 1.5px solid #E6EDF2;
  border-radius: 16px;
  padding: 12px 14px;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  user-select: none;
}

.fg-choice-row-card:last-child {
  margin-bottom: 0;
}

.fg-choice-row-card:hover {
  border-color: #0078F3;
  background: #F8FBFE;
}

.fg-choice-row-card.active {
  background: #F0F7FF;
  border-color: #0078F3;
  box-shadow: 0 2px 8px rgba(0, 120, 243, 0.14);
}

.fg-choice-card-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.fg-choice-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #F1F5F9;
  color: #596575;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.fg-choice-row-card.active .fg-choice-icon-wrap {
  background: #0078F3;
  color: #FFFFFF;
}

.fg-choice-content-wrap {
  display: flex;
  flex-direction: column;
}

.fg-choice-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #071F33;
  line-height: 1.25;
  margin: 0;
}

.fg-choice-card-desc {
  font-size: 12.5px;
  color: #596575;
  margin: 3px 0 0;
  line-height: 1.35;
}

.fg-choice-radio-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.fg-choice-row-card.active .fg-choice-radio-dot {
  border-color: #0078F3;
  background: #0078F3;
}

.fg-choice-radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s ease;
}

.fg-choice-row-card.active .fg-choice-radio-dot::after {
  opacity: 1;
  transform: scale(1);
}

/* GST Invoicing Separation Card */
.fg-gst-invoice-panel {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fg-gst-invoice-panel input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0078F3;
  margin-top: 2px;
  cursor: pointer;
}

.fg-gst-invoice-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.4;
}
