/* ==========================================================================
   Interactive Aircraft Seat Map Styles
   ========================================================================== */

.seat-selection-container {
  padding: 2.5rem 0 5rem 0;
}

.seat-layout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}

/* Passenger Seat Assignment Bar */
.passenger-seat-tabs {
  display: flex;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.passenger-seat-tab {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--bg-body);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.passenger-seat-tab:hover {
  border-color: var(--primary);
}

.passenger-seat-tab.active {
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.seat-tag-badge {
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.passenger-seat-tab.unassigned .seat-tag-badge {
  background: var(--text-light);
}

/* Aircraft Fuselage Frame */
.cabin-fuselage-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 40px 40px var(--radius-xl) var(--radius-xl);
  padding: 2.5rem 1.5rem;
  box-shadow: var(--shadow-md);
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

/* Plane Nose */
.cockpit-nose {
  width: 140px;
  height: 50px;
  background: linear-gradient(180deg, #e2e8f0 0%, #ffffff 100%);
  border: 2px solid var(--border-color);
  border-bottom: none;
  border-radius: 70px 70px 0 0;
  margin: -2.5rem auto 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Cabin Legend */
.seat-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1rem;
  background: var(--bg-body);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  font-size: 0.82rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-icon {
  width: 22px;
  height: 24px;
  border-radius: 4px 4px 2px 2px;
  border: 1.5px solid var(--border-color);
  display: inline-block;
}

.legend-standard { background: #ffffff; border-color: #94a3b8; }
.legend-preferred { background: #dbeafe; border-color: var(--primary); }
.legend-extra { background: #fef3c7; border-color: var(--accent); }
.legend-selected { background: var(--primary); border-color: var(--primary-dark); }
.legend-occupied { background: #cbd5e1; border-color: #94a3b8; }

/* Cabin Area Rows */
.cabin-zone-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0;
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  margin: 1.5rem 0;
  background: var(--bg-body);
}

.cabin-row-letters {
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cabin-seats-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.seat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.row-number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  width: 26px;
  text-align: center;
}

.seat-group {
  display: flex;
  gap: 0.4rem;
}

.aisle-gap {
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Individual Seat Component */
.cabin-seat {
  width: 34px;
  height: 38px;
  border-radius: 6px 6px 3px 3px;
  border: 1.5px solid #94a3b8;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--secondary);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cabin-seat::before {
  content: '';
  position: absolute;
  top: -3px;
  width: 18px;
  height: 3px;
  background: currentColor;
  opacity: 0.4;
  border-radius: 2px 2px 0 0;
}

.cabin-seat:hover:not(.occupied) {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.25);
}

/* Seat Tiers */
.cabin-seat.seat-preferred {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.cabin-seat.seat-extra {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.cabin-seat.occupied {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.cabin-seat.occupied::after {
  content: '✕';
  font-size: 0.8rem;
  color: #94a3b8;
}

.cabin-seat.selected {
  background: var(--primary) !important;
  border-color: var(--primary-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.35);
  transform: scale(1.08);
  z-index: 5;
}

.cabin-seat.selected::after {
  content: '✓';
  font-size: 0.85rem;
  font-weight: 800;
}

/* Wing Indicator on Side */
.aircraft-wing {
  position: absolute;
  width: 30px;
  height: 180px;
  background: #e2e8f0;
  border: 1px solid var(--border-color);
  top: 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.wing-left {
  left: -31px;
  border-radius: 12px 0 0 40px;
}

.wing-right {
  right: -31px;
  border-radius: 0 12px 40px 0;
}

/* Emergency Exit Indicators */
.emergency-exit-marker {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
}

@media (max-width: 992px) {
  .seat-layout-grid {
    grid-template-columns: 1fr;
  }
  .aircraft-wing {
    display: none;
  }
}

@media (max-width: 480px) {
  .cabin-seat {
    width: 28px;
    height: 32px;
    font-size: 0.62rem;
  }
  .aisle-gap {
    width: 14px;
  }
  .cabin-fuselage-wrapper {
    padding: 1.5rem 0.5rem;
  }
}
