/**
 * TripPortier Trips Page Styles
 * My Trips grid layout and trip card components
 */

/* ============================================
   Page Header
   ============================================ */

.trips-header {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2d1b4e 100%);
  padding: 8rem 2rem 3rem;
  color: white;
  text-align: center;
}

.trips-header-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.trips-header-content p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin: 0;
}

/* ============================================
   Main Container
   ============================================ */

.trips-main {
  min-height: 60vh;
  padding: 2rem;
  background: #f8fafc;
}

.trips-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================
   Loading State
   ============================================ */

.trips-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.trips-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: trips-spin 0.8s linear infinite;
}

@keyframes trips-spin {
  to {
    transform: rotate(360deg);
  }
}

.trips-loading p {
  color: #64748b;
  font-size: 1rem;
}

/* ============================================
   Empty States
   ============================================ */

.trips-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.trips-empty-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.trips-empty-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.trips-empty h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.75rem;
}

.trips-empty p {
  color: #64748b;
  font-size: 1rem;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.trips-signin-btn,
.trips-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.trips-signin-btn:hover,
.trips-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* ============================================
   Section Titles
   ============================================ */

.trips-section {
  margin-bottom: 3rem;
}

.trips-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.375rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1.25rem;
}

/* Live Indicator */
.live-indicator {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* ============================================
   Trips Grid
   ============================================ */

.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Active and upcoming trips - same grid, fills available space */
.trips-grid-active {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Past trips - compact grid, more items per row */
.trips-grid-past {
  grid-template-columns: repeat(auto-fill, minmax(180px, 200px));
  gap: 1rem;
}

/* ============================================
   Trip Card
   ============================================ */

.trip-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #1e293b;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Active trip card is taller */
.trip-card-active {
  aspect-ratio: auto;
  min-height: 400px;
}

/* Upcoming trip cards */
.trip-card-upcoming {
  aspect-ratio: auto;
  min-height: 360px;
}

/* Past trip cards - compact style like iOS someday trips */
.trip-card-past {
  min-height: 140px;
  max-height: 160px;
  border-radius: 12px;
}

.trip-card-past:hover {
  transform: translateY(-2px);
}

.trip-card-past .trip-card-overlay {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

.trip-card-past .trip-card-content {
  padding: 0.75rem;
  gap: 0.25rem;
}

.trip-card-past .trip-card-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trip-card-past .trip-card-info {
  font-size: 0.75rem;
  opacity: 0.9;
}

.trip-card-past .trip-card-context {
  display: none;
}

/* Card Background Image */
.trip-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fallback gradient when no image */
.trip-card-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4c1d95 0%, #6366f1 50%, #0ea5e9 100%);
}

/* Dark overlay for text readability */
.trip-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 30%,
    rgba(0, 0, 0, 0.4) 60%,
    rgba(0, 0, 0, 0.75) 100%
  );
}

/* Card Content */
.trip-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Active trip has more padding */
.trip-card-active .trip-card-content {
  padding: 1.5rem;
}

/* Badge Row */
.trip-card-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Live Badge */
.trip-card-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 0.5rem 0.875rem;
  border-radius: 50px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.trip-card-live-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-live 2s ease-in-out infinite;
}

/* Trip Name */
.trip-card-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.trip-card-upcoming .trip-card-name,
.trip-card-past .trip-card-name {
  font-size: 1.375rem;
}

/* Trip Info (dates, countdown) */
.trip-card-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  opacity: 0.95;
}

.trip-card-info-dot {
  opacity: 0.6;
}

/* Day counter for active trip */
.trip-card-day-counter {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.95;
}

/* Context Badge */
.trip-card-context {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.25rem;
  width: fit-content;
}

.trip-card-context-icon {
  font-size: 0.875rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
  .trips-header {
    padding: 6rem 1.5rem 2rem;
  }

  .trips-header-content h1 {
    font-size: 2rem;
  }

  .trips-main {
    padding: 1.5rem 1rem;
  }

  /* Single column on mobile - phone-sized tiles */
  .trips-grid,
  .trips-grid-active {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Past trips - 2 columns on mobile */
  .trips-grid-past {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .trip-card-active {
    min-height: 380px;
  }

  .trip-card-upcoming {
    min-height: 340px;
  }

  .trip-card-past {
    min-height: 120px;
    max-height: 140px;
  }

  .trip-card-name {
    font-size: 1.375rem;
  }

  .trip-card-upcoming .trip-card-name {
    font-size: 1.25rem;
  }

  .trip-card-past .trip-card-name {
    font-size: 0.875rem;
  }

  .trips-section-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .trips-header-content h1 {
    font-size: 1.75rem;
  }

  .trips-empty-icon {
    width: 64px;
    height: 64px;
  }

  .trips-empty-icon svg {
    width: 32px;
    height: 32px;
  }

  .trips-empty h2 {
    font-size: 1.25rem;
  }
}

/* Large screens - limit card width for better proportions */
@media (min-width: 1400px) {
  .trips-grid,
  .trips-grid-active {
    grid-template-columns: repeat(auto-fill, minmax(320px, 400px));
  }

  .trips-grid-past {
    grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  }
}

/* ============================================
   Create Trip Modal
   ============================================ */

.create-trip-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.create-trip-modal.active {
  display: flex;
}

.create-trip-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.3s ease-out;
}

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

.create-trip-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.create-trip-close:hover {
  background: #e2e8f0;
}

.create-trip-close svg {
  width: 20px;
  height: 20px;
  color: #64748b;
}

/* Progress Bar */
.create-trip-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e2e8f0;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}

.create-trip-progress-bar {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.3s ease;
}

/* Step Container */
.create-trip-step {
  text-align: center;
  animation: stepFadeIn 0.3s ease-out;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.create-trip-step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-trip-step-icon svg {
  width: 40px;
  height: 40px;
  color: #6366f1;
}

.create-trip-step-icon.success-icon {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.create-trip-step-icon.success-icon svg {
  color: #10b981;
}

.create-trip-step h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
}

.create-trip-step p {
  font-size: 1rem;
  color: #64748b;
  margin: 0 0 1.5rem;
}

/* Input Groups */
.create-trip-input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.create-trip-input-group input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.create-trip-input-group input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.create-trip-input-group input::placeholder {
  color: #94a3b8;
}

/* Destination Suggestions */
.destination-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.destination-suggestions.active {
  display: block;
}

.destination-suggestion {
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.15s;
  border-bottom: 1px solid #f1f5f9;
}

.destination-suggestion:last-child {
  border-bottom: none;
}

.destination-suggestion:hover {
  background: #f8fafc;
}

.destination-suggestion-icon {
  width: 36px;
  height: 36px;
  background: #ede9fe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.destination-suggestion-text {
  flex: 1;
  text-align: left;
}

.destination-suggestion-name {
  font-weight: 600;
  color: #1e293b;
}

.destination-suggestion-country {
  font-size: 0.875rem;
  color: #64748b;
}

/* Date Inputs */
.create-trip-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.date-input-group {
  text-align: left;
}

.date-input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
}

.date-input-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.date-input-group input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Context Grid */
.create-trip-context-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.context-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.context-option:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.context-option.selected {
  background: #ede9fe;
  border-color: #6366f1;
}

.context-icon {
  font-size: 1.75rem;
}

.context-option span:last-child {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
}

/* Suggested Names */
.suggested-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.suggested-name {
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.suggested-name:hover {
  background: #ede9fe;
  border-color: #6366f1;
  color: #6366f1;
}

/* Buttons */
.create-trip-buttons {
  display: flex;
  gap: 1rem;
}

.create-trip-next,
.create-trip-back {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.create-trip-next {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
}

.create-trip-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.create-trip-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.create-trip-back {
  background: white;
  color: #64748b;
  border: 2px solid #e2e8f0;
}

.create-trip-back:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.create-trip-submit {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.create-trip-submit:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Loading state for submit button */
.create-trip-submit.loading {
  pointer-events: none;
  position: relative;
}

.create-trip-submit.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .create-trip-content {
    padding: 2rem 1.5rem;
  }

  .create-trip-step h2 {
    font-size: 1.25rem;
  }

  .create-trip-context-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .create-trip-dates {
    grid-template-columns: 1fr;
  }
}
/* ============================================
   View Switcher and Controls
   ============================================ */

.trips-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.view-switcher {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 0.5rem;
  border-radius: 12px;
}

.view-switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-switcher-btn svg {
  width: 20px;
  height: 20px;
}

.view-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.view-switcher-btn.active {
  background: white;
  color: #6366f1;
}

/* Action Buttons */
.create-trip-btn,
.add-flight-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  background: white;
  color: #6366f1;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 160px;
}

.create-trip-btn:hover,
.add-flight-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
  background: #f8fafc;
}

.create-trip-btn svg,
.add-flight-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .trips-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .view-switcher {
    width: 100%;
  }

  .view-switcher-btn {
    flex: 1;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
  }

  .create-trip-btn,
  .add-flight-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   Flights Container
   ============================================ */

.flights-container {
  max-width: 1200px;
  margin: 0 auto;
}

.flights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Past flights grid - more compact */
.flights-grid.past-flights {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* ============================================
   Flight Card
   ============================================ */

.flight-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.flight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Flight Card Header */
.flight-card-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  padding: 1.25rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flight-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.flight-card-airline-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.flight-card-flight-number {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.flight-card-airline-name {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}

/* Status Badge */
.flight-card-status-badge {
  padding: 0.375rem 0.875rem;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: capitalize;
}

.flight-card-status-badge.status-scheduled {
  background: rgba(59, 130, 246, 0.2);
}

.flight-card-status-badge.status-active,
.flight-card-status-badge.status-en-route {
  background: rgba(34, 197, 94, 0.25);
}

.flight-card-status-badge.status-landed {
  background: rgba(168, 85, 247, 0.25);
}

.flight-card-status-badge.status-delayed {
  background: rgba(251, 146, 60, 0.25);
}

.flight-card-status-badge.status-cancelled {
  background: rgba(239, 68, 68, 0.25);
}

/* Flight Card Body */
.flight-card-body {
  padding: 1.5rem 1.25rem;
}

/* Route Section */
.flight-card-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.flight-card-airport {
  flex: 1;
  text-align: center;
}

.flight-card-airport-code {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.25rem;
}

.flight-card-airport-name {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
}

.flight-card-route-line {
  flex: 0 0 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
  position: relative;
  margin: 0 1rem;
}

.flight-card-route-line::after {
  content: '✈';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  color: #6366f1;
}

/* Times Section */
.flight-card-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.flight-card-time {
  flex: 1;
  text-align: center;
}

.flight-card-time-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.flight-card-time-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.flight-card-time-delayed {
  text-decoration: line-through;
  opacity: 0.6;
  font-size: 1.125rem;
  color: #64748b;
  font-weight: 600;
}

.flight-card-time-estimated {
  color: #f59e0b;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
}

.flight-card-time-estimated::before {
  content: 'Estimated';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  color: #f59e0b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.flight-card-duration {
  flex: 0 0 80px;
  text-align: center;
  padding: 0 1rem;
}

.flight-card-duration-label {
  font-size: 0.6875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.125rem;
}

.flight-card-duration-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #64748b;
}

/* Details Section */
.flight-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.flight-card-details-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.flight-card-details-column-title {
  font-size: 0.6875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.flight-card-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flight-card-detail-icon {
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.flight-card-detail-text {
  flex: 1;
}

.flight-card-detail-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.125rem;
}

.flight-card-detail-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
}

/* Delay Indicator */
.flight-card-delay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fef3c7;
  border-radius: 8px;
  margin-top: 1rem;
}

.flight-card-delay-icon {
  font-size: 1.125rem;
}

.flight-card-delay-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #92400e;
}

/* Past flight card - compact style */
.flight-card.past {
  opacity: 0.85;
}

.flight-card.past:hover {
  opacity: 1;
}

.flight-card.past .flight-card-header {
  padding: 0.875rem 1rem;
}

.flight-card.past .flight-card-airline-icon {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.flight-card.past .flight-card-flight-number {
  font-size: 1rem;
}

.flight-card.past .flight-card-airline-name {
  display: none;
}

.flight-card.past .flight-card-status-badge {
  display: none;
}

.flight-card.past .flight-card-body {
  padding: 1rem;
}

.flight-card.past .flight-card-route {
  margin-bottom: 0.75rem;
}

.flight-card.past .flight-card-airport-code {
  font-size: 1.25rem;
}

.flight-card.past .flight-card-airport-name {
  font-size: 0.75rem;
}

.flight-card.past .flight-card-route-line {
  flex: 0 0 40px;
  margin: 0 0.5rem;
}

.flight-card.past .flight-card-route-line::after {
  font-size: 0.875rem;
}

/* Hide all extra details for past flights */
.flight-card.past .flight-card-times,
.flight-card.past .flight-card-details,
.flight-card.past .flight-card-delay {
  display: none;
}

/* Show flight date for past flights */
.flight-card-date {
  display: none; /* Hidden by default */
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 0.75rem;
}

.flight-card.past .flight-card-date {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .flights-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .flights-grid.past-flights {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 100%;
  }

  .flight-card-airport-code {
    font-size: 1.5rem;
  }

  .flight-card-time-value {
    font-size: 1.25rem;
  }

  .flight-card-details {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .flight-card.past .flight-card-airport-code {
    font-size: 1.125rem;
  }

  .flight-card.past .flight-card-airport-name {
    font-size: 0.6875rem;
  }

  .flight-card.past .flight-card-date {
    font-size: 0.75rem;
  }
}

@media (min-width: 1400px) {
  .flights-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 420px));
  }

  .flights-grid.past-flights {
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
  }
}

/* ============================================
   Beta Badge
   ============================================ */

.trips-header-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  animation: beta-pulse 2s ease-in-out infinite;
}

.beta-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.beta-badge-icon {
  font-size: 1rem;
  animation: beta-rocket 3s ease-in-out infinite;
}

@keyframes beta-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
  }
}

@keyframes beta-rocket {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* ============================================
   Beta Modal
   ============================================ */

.beta-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.beta-modal.active {
  display: flex;
}

.beta-modal-content {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: white;
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: betaModalSlideUp 0.3s ease-out;
  text-align: center;
}

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

.beta-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.beta-modal-close:hover {
  background: #e2e8f0;
}

.beta-modal-close svg {
  width: 20px;
  height: 20px;
  color: #64748b;
}

.beta-modal-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: beta-rocket 3s ease-in-out infinite;
}

.beta-modal h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
}

.beta-modal-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0 0 2rem;
}

.beta-modal-features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
  text-align: left;
}

.beta-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
}

.beta-feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.beta-feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.beta-feature-text strong {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
}

.beta-feature-text span {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.4;
}

.beta-modal-description {
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 2rem;
}

.beta-modal-actions {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

.beta-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.beta-modal-btn svg {
  width: 20px;
  height: 20px;
}

.beta-modal-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
}

.beta-modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.beta-modal-btn-secondary {
  background: white;
  color: #25d366;
  border: 2px solid #e2e8f0;
}

.beta-modal-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .trips-header-title-row {
    flex-wrap: wrap;
  }

  .trips-header-title-row h1 {
    flex: 1 0 100%;
  }

  .beta-badge {
    font-size: 0.6875rem;
    padding: 0.3125rem 0.75rem;
  }

  .beta-modal-content {
    padding: 2rem 1.5rem;
  }

  .beta-modal h2 {
    font-size: 1.5rem;
  }

  .beta-modal-icon {
    font-size: 3rem;
  }

  .beta-modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .beta-modal-content {
    padding: 1.5rem 1.25rem;
  }

  .beta-feature {
    padding: 0.75rem;
  }

  .beta-feature-icon {
    font-size: 1.25rem;
  }
}

/* ============================================
   Add Flight Modal
   ============================================ */

.add-flight-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.add-flight-modal.active {
  display: flex;
}

.add-flight-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

.add-flight-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.add-flight-modal-close:hover {
  background: #e2e8f0;
}

.add-flight-modal-close svg {
  width: 20px;
  height: 20px;
  color: #64748b;
}

.add-flight-modal-icon {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.add-flight-modal-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
  text-align: center;
}

.add-flight-modal-subtitle {
  font-size: 0.9375rem;
  color: #64748b;
  margin: 0 0 2rem;
  text-align: center;
}

/* Form Styles */
.add-flight-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.add-flight-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.add-flight-input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
}

.add-flight-input-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.add-flight-input-group input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.add-flight-input-group input::placeholder {
  color: #94a3b8;
}

.add-flight-input-hint {
  font-size: 0.8125rem;
  color: #94a3b8;
}

/* Premium Notice */
.add-flight-premium-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  border: 1px solid #fbbf24;
}

.add-flight-premium-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.add-flight-premium-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.add-flight-premium-text strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: #92400e;
}

.add-flight-premium-text span {
  font-size: 0.8125rem;
  color: #78350f;
}

/* Error Message */
.add-flight-error {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #fee2e2;
  border-radius: 12px;
  border: 1px solid #f87171;
}

.add-flight-error svg {
  width: 20px;
  height: 20px;
  color: #dc2626;
  flex-shrink: 0;
  margin-top: 2px;
}

.add-flight-error span {
  font-size: 0.875rem;
  color: #991b1b;
  line-height: 1.4;
}

/* Buttons */
.add-flight-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.add-flight-btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-flight-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

.add-flight-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.add-flight-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.add-flight-btn-secondary {
  background: white;
  color: #64748b;
  border: 2px solid #e2e8f0;
}

.add-flight-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Loading Spinner */
.add-flight-spinner {
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
}

.add-flight-spinner circle {
  stroke-dasharray: 50;
  stroke-dashoffset: 25;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Upgrade Prompt */
.add-flight-upgrade-prompt {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 1.5rem;
}

.add-flight-upgrade-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.add-flight-upgrade-prompt h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
}

.add-flight-upgrade-prompt > p {
  font-size: 0.9375rem;
  color: #64748b;
  margin: 0 0 1.5rem;
}

.add-flight-upgrade-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.add-flight-upgrade-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
}

.add-flight-upgrade-features svg {
  width: 20px;
  height: 20px;
  color: #10b981;
  flex-shrink: 0;
}

.add-flight-upgrade-features li {
  font-size: 0.9375rem;
  color: #475569;
  font-weight: 500;
}

.add-flight-upgrade-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .add-flight-modal-content {
    padding: 2rem 1.5rem;
  }

  .add-flight-modal-content h2 {
    font-size: 1.5rem;
  }

  .add-flight-buttons {
    flex-direction: column;
  }
}
