/*
 * MyAviatorList - AME Foresight inspired design system
 * Chart paper surfaces, ink typography, and copper aviation accents.
 */

/* ========= VARIABLES ========= */
:root {
  /* AME Foresight palette */
  --color-ink: #0a1530;
  --color-ink-soft: #1a2748;
  --color-ink-mute: #4a5878;
  --color-paper: #f5efe2;
  --color-paper-soft: #efe7d4;
  --color-paper-deep: #e7dcc4;
  --color-paper-line: #d4c8ad;
  --color-canvas: #fbf7ee;
  --color-canvas-elevated: #ffffff;
  --color-copper: #b8551e;
  --color-copper-soft: #d8753f;
  --color-copper-glow: rgba(184, 85, 30, 0.12);
  --color-success: #2a6b3f;
  --color-warning: #b8551e;
  --color-error: #b03032;

  /* Backward-compatible app variables */
  --primary: var(--color-ink);
  --primary-dark: #050b1c;
  --secondary: var(--color-ink-mute);
  --success: var(--color-success);
  --danger: var(--color-error);
  --warning: var(--color-warning);
  --info: var(--color-copper);
  --light: var(--color-canvas);
  --dark: var(--color-ink);
  --accent: var(--color-paper-soft);
  
  /* Text colors */
  --text-primary: var(--color-ink);
  --text-secondary: var(--color-ink-mute);
  --text-muted: #68728c;
  
  /* Background colors */
  --bg-light: var(--color-canvas-elevated);
  --bg-accent: var(--color-paper);
  --bg-subtle: var(--color-canvas);
  
  /* Border colors */
  --border-light: rgba(212, 200, 173, 0.82);
  --border-medium: var(--color-paper-line);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;
  
  /* Border radius */
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 8px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(40, 28, 8, 0.06);
  --shadow: 0 4px 12px rgba(40, 28, 8, 0.08), 0 1px 2px rgba(40, 28, 8, 0.04);
  --shadow-md: 0 10px 24px rgba(40, 28, 8, 0.1), 0 1px 2px rgba(40, 28, 8, 0.04);
  --shadow-lg: 0 18px 40px -12px rgba(40, 28, 8, 0.18), 0 4px 8px rgba(40, 28, 8, 0.06);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.3s ease;

  --paper-grain:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.32 0 0 0 0 0.18 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

/* ========= RESET & BASE ========= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* Disable text resizing on orientation change */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--color-paper);
  background-image:
    radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(184, 85, 30, 0.05), transparent 60%),
    var(--paper-grain);
  background-attachment: fixed, fixed;
  background-size: auto, 240px 240px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent horizontal overflow on all devices */
  overflow-x: hidden !important;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-copper);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========= TYPOGRAPHY ========= */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.12;
  color: var(--text-primary);
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.75rem);
  line-height: 1;
}

h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.5rem);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

p {
  margin-bottom: 1rem;
}

/* ========= LAYOUT ========= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-sm {
  padding: var(--spacing-lg) 0;
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

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

.col-3 {
  grid-template-columns: repeat(3, 1fr);
}

.col-4 {
  grid-template-columns: repeat(4, 1fr);
}

.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

/* Remove checkmarks from nearby-pilot page rating badges */
.pilot-results .rating-badge.active::after,
.pilot-results .rating-badge.active:after {
  content: none !important;
}

.flex-column {
  flex-direction: column;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: flex-end;
}

.align-items-center {
  align-items: center;
}

.align-items-start {
  align-items: flex-start;
}

.align-items-end {
  align-items: flex-end;
}

.gap-2 {
  gap: var(--spacing-xs);
}

.gap-3 {
  gap: var(--spacing-sm);
}

/* ========= HEADER & NAVIGATION ========= */
/* Navigation styles moved to navbar.css */

/* ========= MOBILE RESPONSIVE UTILITIES ========= */
@media (max-width: 768px) {
  /* Fix mobile columns on edit profile page */
  .col-md-6 {
    width: 100%;
  }
  
  /* Fix mobile tables for client roster */
  .table-responsive {
    border: 0;
    margin-bottom: 0;
  }
  
  /* Arrange buttons in a more mobile-friendly way */
  .d-flex.flex-wrap.gap-2 {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .d-flex.flex-wrap.gap-2 .btn-sm {
    margin-bottom: 8px;
    width: 100%;
  }
  
  /* Improve the table overflow handling */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  
  /* Fix input groups that are squished on mobile */
  .input-group {
    flex-wrap: wrap;
  }
  
  .input-group > .form-control,
  .input-group > .form-select {
    width: 70%;
    flex: 0 0 70%;
  }
  
  .input-group > .btn {
    width: 30%;
    flex: 0 0 30%;
  }
  
  /* Fix alert info boxes */
  .alert-info {
    font-size: 12px;
    padding: 8px;
  }
  
  /* Make dropdown selects more mobile friendly */
  select.form-select {
    text-overflow: ellipsis;
    padding-right: 25px; /* Room for dropdown arrow */
  }
}

/* ========= BUTTONS ========= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  cursor: pointer;
  background-color: var(--color-ink);
  color: var(--color-paper);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background-color: var(--color-copper);
  box-shadow: 0 12px 26px -12px rgba(184, 85, 30, 0.65);
  color: var(--color-paper);
  transform: translateY(-1px);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem var(--color-copper-glow);
}

.btn-lg {
  padding: 0.6rem 1.25rem;
  font-size: 1.05rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background-color var(--transition-fast);
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-paper-line);
  color: var(--color-ink);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: rgba(184, 85, 30, 0.08);
  border-color: var(--color-copper);
  color: var(--color-copper);
}

.btn-light,
.btn-secondary {
  background-color: var(--color-canvas-elevated);
  border-color: var(--border-light);
  color: var(--color-ink);
}

.btn-light:hover,
.btn-secondary:hover {
  background-color: rgba(184, 85, 30, 0.08);
  border-color: var(--color-copper);
  color: var(--color-copper);
}

.btn-success {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.btn-danger {
  background-color: var(--color-error);
  border-color: var(--color-error);
  color: #fff;
}

/* ========= CARDS ========= */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-canvas-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

/* Apply hover effects only to cards that should have them */
.card.card-hover {
  transition: transform var(--transition), box-shadow var(--transition);
}

.card.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--color-canvas);
}

.card-body {
  padding: 1.5rem;
  flex: 1 1 auto;
}

.card-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* ========= FORMS ========= */
.form-group {
  margin-bottom: 0.75rem;
}

.form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-ink);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-primary);
  background-color: var(--color-canvas-elevated);
  background-clip: padding-box;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--color-copper);
  outline: 0;
  box-shadow: 0 0 0 0.25rem var(--color-copper-glow);
}

/* Prevent iOS zoom on form inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
  font-size: 16px; /* Prevents iOS zoom */
  border-radius: 8px;
}

.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  padding-right: 2.25rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-primary);
  background-color: var(--color-canvas-elevated);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  appearance: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select:focus {
  border-color: var(--color-copper);
  outline: 0;
  box-shadow: 0 0 0 0.25rem var(--color-copper-glow);
}

.form-check {
  display: block;
  min-height: 1.5rem;
  padding-left: 1.75em;
  margin-bottom: 0.25rem;
}

.form-check-input {
  width: 20px;
  height: 20px;
  margin-top: 0.1em;
  margin-left: -1.75em;
  vertical-align: top;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid var(--border-medium);
  appearance: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
  /* Ensure consistent display across browsers */
  display: inline-block;
  min-height: unset; /* Override any min-height setting */
  box-sizing: border-box;
}

.form-check-input[type="checkbox"] {
  border-radius: 4px;
}

.form-check-input:checked {
  background-color: var(--color-copper);
  border-color: var(--color-copper);
}

.form-check-input:focus {
  border-color: var(--color-copper);
  outline: 0;
  box-shadow: 0 0 0 0.25rem var(--color-copper-glow);
}

.form-check-label {
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  /* Add a little padding to increase touch target size */
  padding: 2px 0;
  display: inline-block;
}

/* ========= TABLES ========= */
.table-container {
  overflow-x: auto;
  margin-bottom: var(--spacing-lg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  /* Ensure touch scrolling works on mobile */
  -webkit-overflow-scrolling: touch;
  /* Prevent table from being stretched by contents */
  max-width: 100%;
  /* Make it obvious that table is scrollable */
  position: relative;
}

/* Add scroll indicators on mobile for tables */
@media (max-width: 768px) {
  .table-container:before,
  .table-container:after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15px;
    z-index: 1;
    pointer-events: none;
  }
  
  .table-container:before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.8), rgba(255,255,255,0));
  }
  
  .table-container:after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.8), rgba(255,255,255,0));
  }
}

.table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Specific column behavior */
.table th:first-child { 
  min-width: 120px; /* Name column */
}
.table th:nth-child(2) { 
  width: 80px; /* Airport column */
}
.table th:nth-child(3) { 
  min-width: 150px; /* Aircraft column */
}
.table th:nth-child(5), 
.table th:nth-child(6) { 
  width: 100px; /* Preferred & Status columns */
  text-align: center;
}
.table td:nth-child(5),
.table td:nth-child(6) {
  text-align: center;
}
.table th:last-child, 
.table td:last-child {
  width: 80px; /* Actions column */
  text-align: center;
}

.table th,
.table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

/* Email cell specific style */
.table td:nth-child(4) {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Make tables more readable on small screens */
@media (max-width: 768px) {
  .table th,
  .table td {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  /* Improve readability with alternating row colors */
  .table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
  }
}

.table th {
  background-color: var(--color-canvas);
  font-weight: 600;
  border-bottom: 1px solid var(--border-medium);
}

.table tbody tr:hover {
  background-color: rgba(184, 85, 30, 0.05);
}

/* Background accent for highlighted rows */
.bg-accent {
  background-color: rgba(0, 102, 204, 0.05);
}

/* Opacity for unavailable/hidden items */
.opacity-50 {
  opacity: 0.5;
}

/* Text truncation for long content */
.text-truncate {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Pilot name link styling */
.pilot-name-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  display: block;
  transition: color 0.2s ease;
}

.pilot-name-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ========= ALERTS ========= */
.alert {
  position: relative;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.alert-info {
  background-color: rgba(10, 21, 48, 0.06);
  color: var(--color-ink);
}

.alert-success {
  background-color: rgba(42, 107, 63, 0.1);
  color: var(--color-success);
}

.alert-warning {
  background-color: rgba(184, 85, 30, 0.1);
  color: var(--color-copper);
}

.alert-danger {
  background-color: rgba(176, 48, 50, 0.1);
  color: var(--color-error);
}

/* ========= BADGES ========= */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--radius-sm);
}

/* Type Rating Badges */
.type-rating-badges {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  margin-right: 6px;
  padding: 2px;
}

.rating-badge {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  background-color: #e2e2e2;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #ccc;
  user-select: none;
  font-weight: bold;
  margin: 0 2px;
  position: relative;
  display: inline-block;
  min-width: 40px;
  text-align: center;
}

.rating-badge:hover {
  background-color: #d0d0d0;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.rating-badge:active {
  transform: translateY(0);
  box-shadow: none;
}

.rating-badge.active {
  background-color: #0066cc;
  color: white;
  border-color: #0055aa;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(0, 102, 204, 0.8);
  animation: badgePulse 0.3s ease;
}

.rating-badge.active:after {
  content: "✓";
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #28a745;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid white;
}

/* PIC/SIC specific badge style */
.rating-badge[data-rating-type="PIC"] {
  background-color: #f0f0f0;
  border-color: #d0d0d0;
  color: #333;
}

.rating-badge[data-rating-type="SIC"] {
  background-color: #f0f0f0;
  border-color: #d0d0d0;
  color: #333;
}

.rating-badge[data-rating-type="PIC"].active {
  background-color: var(--color-ink);
  color: var(--color-paper);
  border-color: var(--color-ink);
  box-shadow: 0 0 8px rgba(10, 21, 48, 0.28);
}

.rating-badge[data-rating-type="SIC"].active {
  background-color: #6c757d;
  color: white;
  border-color: #545b62;
  box-shadow: 0 0 8px rgba(108, 117, 125, 0.6);
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.badge-primary {
  background-color: var(--primary);
  color: white;
}

.badge-pilot {
  background-color: #0055b3; /* Darker blue for better contrast */
  color: white;
  margin-left: 0.35em;
  font-size: 0.8em;
  padding: 0.35em 0.6em;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-secondary {
  background-color: var(--secondary);
  color: white;
}

.badge-success {
  background-color: var(--success);
  color: white;
}

.badge-danger {
  background-color: var(--danger);
  color: white;
}

.badge-warning {
  background-color: var(--warning);
  color: #212529;
}

.badge-info {
  background-color: var(--info);
  color: white;
}

.badge-light {
  background-color: var(--light);
  color: #212529;
}

.badge-dark {
  background-color: var(--dark);
  color: white;
}

/* ========= UTILITIES ========= */
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-info { background-color: var(--info) !important; }
.bg-light { background-color: var(--bg-light) !important; }
.bg-dark { background-color: var(--dark) !important; }
.bg-accent { background-color: var(--bg-accent) !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-light { color: var(--light) !important; }
.text-dark { color: var(--dark) !important; }
.text-muted { color: var(--text-muted) !important; }

.rounded { border-radius: var(--radius) !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }

.shadow { box-shadow: var(--shadow) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.mt-1 { margin-top: var(--spacing-xs) !important; }
.mt-2 { margin-top: var(--spacing-sm) !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.mt-4 { margin-top: var(--spacing-lg) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--spacing-xs) !important; }
.mb-2 { margin-bottom: var(--spacing-sm) !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }
.mb-5 { margin-bottom: var(--spacing-xl) !important; }

.ms-1 { margin-left: var(--spacing-xs) !important; }
.ms-2 { margin-left: var(--spacing-sm) !important; }
.ms-3 { margin-left: var(--spacing-md) !important; }
.ms-4 { margin-left: var(--spacing-lg) !important; }

.me-1 { margin-right: var(--spacing-xs) !important; }
.me-2 { margin-right: var(--spacing-sm) !important; }
.me-3 { margin-right: var(--spacing-md) !important; }
.me-4 { margin-right: var(--spacing-lg) !important; }

.p-1 { padding: var(--spacing-xs) !important; }
.p-2 { padding: var(--spacing-sm) !important; }
.p-3 { padding: var(--spacing-md) !important; }
.p-4 { padding: var(--spacing-lg) !important; }

.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }

.h-100 { height: 100% !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }

/* ========= PAGE-SPECIFIC STYLES ========= */

/* === Pilot Table === */
.pilot-table-container {
  width: 100%;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

table.pilot-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
  table-layout: fixed;
  background-color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}

.pilot-table th,
.pilot-table td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.pilot-table th {
  background-color: var(--bg-accent);
  font-weight: 600;
  border-bottom: 2px solid var(--border-medium);
}

.pilot-table th.checkbox-column,
.pilot-table td.checkbox-column {
  width: 120px;
  min-width: 120px;
  padding-left: 1.25rem;
}

.pilot-table th.name-column,
.pilot-table td.name-column {
  width: 30%;
  min-width: 150px;
  padding-left: 0.75rem;
}

.pilot-table th.aircraft-column,
.pilot-table td.aircraft-column {
  width: 30%;
  min-width: 120px;
}

.pilot-table th.airport-column,
.pilot-table td.airport-column {
  width: 15%;
  min-width: 80px;
}

.pilot-table th.status-column,
.pilot-table td.status-column {
  width: 15%;
  min-width: 100px;
}

.pilot-table .select-all-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.pilot-table .select-all-container label {
  font-size: 0.9rem;
  white-space: nowrap;
  font-weight: 500;
  margin-bottom: 0;
  user-select: none;
}

.pilot-table .pilot-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pilot-table .pilot-row:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.pilot-table .pilot-row.unavailable {
  opacity: 0.65;
  background-color: var(--bg-accent);
  cursor: default;
}

.pilot-table .name-container,
.pilot-table .status-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.pilot-table .pilot-name {
  font-weight: 500;
}

/* Additional styles from pilot-table.css */
.pilot-table .form-check-input {
  cursor: pointer;
  margin-top: 0;
  margin-right: 0;
}

/* Flight Request Form Styles */
.flight-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background-color: #fff;
}

.flight-card-header {
  padding: 0.75rem 1rem;
  background-color: var(--bg-accent);
  border-bottom: 1px solid var(--border-light);
}

.flight-card-body {
  padding: 0;
}

.toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.toggle-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Pilot List Item */
.pilot-list-item {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.pilot-list-item:hover {
  background-color: var(--bg-accent);
}

.pilot-list-item.disabled {
  opacity: 0.6;
  background-color: #f8f9fa;
}

/* Media queries for pilot table responsiveness */
@media (max-width: 768px) {
  .pilot-table th.checkbox-column,
  .pilot-table td.checkbox-column {
    width: 60px;
    min-width: 60px;
    padding-left: 0.75rem;
  }
  
  .pilot-table .select-all-container label {
    display: none;
  }
}

/* === Login & Register Pages === */
.login-container,
.register-container {
  max-width: 450px;
  margin: 3rem auto;
}

.login-container .card,
.register-container .card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  /* Remove transition since we don't want hover effects on this card */
}

.login-container .card-header,
.register-container .card-header {
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.login-container .card-header h3,
.register-container .card-header h3 {
  margin-bottom: 0;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.login-container .card-body,
.register-container .card-body {
  padding: 2rem;
}

.login-container .form-label,
.register-container .form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.login-container .form-control,
.register-container .form-control {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background-color: var(--bg-light);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.login-container .form-control:focus,
.register-container .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 85, 30, 0.15);
  outline: none;
}

.login-container .btn-primary,
.register-container .btn-primary {
  width: 100%;
  padding: 0.6rem 1.25rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-container .btn-primary:hover,
.register-container .btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.login-options,
.register-options {
  margin-top: 1.5rem;
  text-align: center;
}

.login-options p,
.register-options p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.login-options a,
.register-options a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.login-options a:hover,
.register-options a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.login-container hr,
.register-container hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--border-light);
}

/* Fade-in animation */
.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========= FOOTER ========= */
/* Hero Section */
.hero {
  text-align: center;
  padding: var(--spacing-xl) 0;
  position: relative;
}

.hero.bg-accent {
  background-color: var(--bg-accent);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.8;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
}

/* Card Icons for Feature Cards */
.card-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--primary);
}

.feature-image-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
}

.feature-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: block;
  margin: 0 auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.feature-image:hover {
  transform: scale(1.02);
}

/* Home Page Card Styles */
.text-center .card {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.text-center .card h3 {
  margin-bottom: var(--spacing-sm);
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
  animation: slideUp 0.5s ease-in-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

/* Footer styles moved to footer.css */

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast-notification {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 10px;
  overflow: hidden;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 350px;
  border-left: 4px solid var(--primary);
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification.success {
  border-left-color: var(--success);
}

.toast-notification.error {
  border-left-color: var(--danger);
}

.toast-notification.warning {
  border-left-color: var(--warning);
}

.toast-content {
  display: flex;
  padding: 15px;
  align-items: center;
}

.toast-message {
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
}

/* Message Notification Badge */
.message-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: pulse 1.5s infinite;
  z-index: 5;
}

/* Message notification in dropdown menu */
#userDropdown a[href="/messaging"] {
  position: relative;
}

#dropdownMessageBadge {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}
  color: var(--text-secondary);
  padding: 5px;
}

.divider {
  height: 1px;
  background-color: var(--border-light);
  width: 100%;
}

/* ========= USER PROFILE STYLES ========= */
.panel {
  background-color: var(--bg-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.panel-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.panel-header h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 576px) {
  .profile-info {
    grid-template-columns: repeat(2, 1fr);
  }
}

.profile-info-item {
  padding: 16px;
  background-color: var(--bg-accent);
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.data-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-right: 8px;
}

.data-value {
  font-weight: 400;
}

/* Aircraft styles */
.aircraft-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.aircraft-item {
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background-color: var(--bg-accent);
}

.aircraft-item.primary {
  border-color: var(--primary);
  background-color: rgba(184, 85, 30, 0.05);
}

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

.aircraft-header h4 {
  margin-bottom: 0;
  font-weight: 600;
}

.aircraft-actions {
  display: flex;
  gap: 8px;
}

.add-aircraft {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

/* Airport search */
.airport-search {
  position: relative;
}

.airport-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: var(--shadow-md);
}

.airport-results.active {
  display: block;
}

.airport-result-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.airport-result-item:hover {
  background-color: var(--bg-accent);
}

.selected-airport {
  margin-top: 12px;
  padding: 12px;
  background-color: rgba(184, 85, 30, 0.05);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--primary);
}

.airport-code {
  font-weight: 600;
}

/* ========= MEDIA QUERIES ========= */
@media (max-width: 992px) {
  .col-2, .col-3, .col-4 {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .panel {
    padding: 16px;
  }
  
  .aircraft-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .aircraft-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
  }
  
  .form-control, .form-select, .btn {
    padding: 0.5rem 0.75rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .login-container,
  .register-container {
    max-width: 90%;
    margin: 2rem auto;
  }
  
  /* Edit Pilot Profile page mobile fixes */
  .profile-section {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  /* Fix scrolling issues within sections */
  .profile-section {
    overflow-x: hidden;
    max-width: 100%;
  }
  
  /* Improve spacing in flight hours section */
  .flight-hours-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .flight-hours-container > div {
    width: 100%;
    margin-bottom: 8px;
  }
  
  /* Improve tag display on mobile */
  .tag {
    max-width: 95%;
    white-space: normal;
    word-break: break-word;
    margin-bottom: 8px;
  }
  
  /* Fix type rating badges display */
  .type-rating-badges {
    flex-wrap: wrap;
    margin-top: 4px;
    justify-content: flex-start;
  }
  
  /* Make rating badges more tappable */
  .rating-badge {
    padding: 8px 12px;
    margin: 4px;
  }
  
  /* Improve recurrent training cards */
  .training-record-card {
    margin-bottom: 12px;
  }
  
  /* Improved form checkboxes for mobile */
  .form-check-input {
    width: 20px !important;
    height: 20px !important;
    margin-right: 8px;
  }
  
  /* Better spacing for mobile */
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .card {
    border-radius: 12px;
    margin-bottom: 16px;
  }
  
  .card-header {
    padding: 16px;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .form-group {
    margin-bottom: 16px;
  }
  
  /* Larger tap targets for mobile */
  .btn:not(.close),
  button:not(.close):not([class*="page"]),
  .nav-link,
  .form-control,
  .form-select {
    min-height: 44px; /* Apple's recommended minimum */
  }
  
  /* Fix for pilot checkbox section in mobile view */
  #pilotCheckboxList {
    display: block !important; /* Override grid display */
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 10px;
  }
  
  /* Make sure card has overflow rules */
  #pilotCheckboxes .card-body {
    overflow-x: auto; /* Enable horizontal scrolling if needed */
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
  }
  
  /* Fix for the pilot items in mobile view */
  .pilot-list-item {
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
    width: 100%;
  }
  
  /* Ensure pilot info text wraps properly on small screens */
  .pilot-aircraft-info {
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  /* Fix badges display on small screens */
  .pilot-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  
  /* Fixes for edit-pilot-profile.ejs inline styles */
  /* These target the inline styling we can't directly modify */
  /* Fix medical information section layout */
  div[style*="display: flex; flex-wrap: wrap; gap: 16px; align-items: center;"] {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  div[style*="display: flex; flex-wrap: wrap;"] > div[style*="display: flex; align-items: center;"] {
    width: 100% !important;
    margin-bottom: 10px;
  }
  
  div[style*="display: flex; align-items: center;"] label.form-label {
    min-width: 90px !important;
  }
  
  /* Fix grid layout for recurrent training cards */
  div[style*="display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Fix client roster actions */
  .d-flex.justify-content-between {
    flex-direction: column;
    gap: 10px;
  }
  
  /* Additional container style for mobile scrolling */
  .mobile-scroll-container {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
    width: 100%;
  }
  
  /* Style for pilot checkbox container - convert from grid to table layout */
  #pilotCheckboxList.mobile-scroll-container {
    display: table;
    table-layout: fixed;
    width: 100%;
    min-width: 600px; /* Force horizontal scrolling */
    margin: 0;
    padding: 0;
  }
  
  /* Style for the pilot list items in scrollable container */
  #pilotCheckboxList.mobile-scroll-container .pilot-list-item {
    display: table-cell;
    width: 50%;
    padding: 10px;
    vertical-align: top;
    border: 1px solid var(--border-light);
    background-color: var(--bg-light);
  }
  
  /* Improve checkbox visibility */
  #pilotCheckboxList.mobile-scroll-container .form-check {
    display: flex;
    align-items: flex-start;
    padding-left: 0;
  }
  
  #pilotCheckboxList.mobile-scroll-container .form-check-input {
    margin-top: 4px;
    margin-right: 8px;
    margin-left: 0;
    position: relative;
  }
  
  #pilotCheckboxList.mobile-scroll-container .form-check-label {
    padding-left: 5px;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 13px;
  }
  
  .container {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }
  
  .d-sm-none {
    display: none !important;
  }
}

/* Visual feedback for touch actions */
@media (max-width: 768px) {
  .btn:active,
  .form-control:active,
  a:active {
    opacity: 0.7;
    transform: scale(0.98);
  }
  
  /* Fix for iOS safari 100vh issue */
  .full-height {
    height: 100vh;
    height: -webkit-fill-available;
  }
}
/* ========= BUTTON STYLES ========= */
/* Improve Button Styling */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 0.25rem;
  border: 1px solid var(--border-medium);
  background-color: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

.btn-outline:hover {
  background-color: var(--bg-accent);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-outline i {
  margin-right: 0.5rem;
}

/* Contact Link Styles */
.contact-link {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.contact-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.email-link {
  font-size: 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  word-break: break-all;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-link {
  white-space: nowrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
}

.contact-item i {
  min-width: 16px;
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
  font-style: italic;
}

/* Pilots table styling */
.pilots-table td {
  vertical-align: middle;
}

.pilots-table th {
  border-bottom: 2px solid var(--border-light);
}

.pilots-table .email-link {
  max-width: 220px;
  display: inline-block;
}

/* Airport Search and Nearby Pilots Styles */
.airport-search-container {
  position: relative;
}

#airport-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: white;
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 300px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.airport-suggestion {
  cursor: pointer;
  transition: background-color 0.2s;
}

.airport-suggestion:last-child {
  border-bottom: none !important;
}

.airport-suggestion:hover {
  background-color: var(--bg-accent);
}

#loading-indicator {
  text-align: center;
  padding: 2rem;
}

.pilot-results .card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.pilot-results .card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Disclaimer box styles */
.disclaimer-box {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

.disclaimer-header {
  background-color: #fcf8e3;
  color: #8a6d3b;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid #faebcc;
}

.disclaimer-body {
  padding: 1rem;
  background-color: #fffaf0;
}

.disclaimer-body .small {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.small-list {
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.small-list li {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.small-list li:last-child {
  margin-bottom: 0;
}

.nearby-results-header {
  background-color: var(--bg-accent);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

/* ========= REVIEW SYSTEM STYLES ========= */
/* Star Rating - Enhanced Original Implementation */
.star-rating {
  margin-bottom: 20px;
}

.star-rating input[type="radio"] {
  display: none;
}

.star-rating i {
  font-size: 60px; /* Increased from 50px to 60px */
  color: #ffb400;
  cursor: pointer;
  transition: all 0.1s ease;
  display: inline-block; /* Ensure proper display */
}

.star-rating .rating-option {
  position: relative;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.star-rating .rating-option:hover {
  transform: translateY(-5px); /* Lift on hover */
}

.star-rating label {
  cursor: pointer;
  display: block;
  margin-bottom: 5px;
}

/* Regular stars (empty) */
.star-rating .far.fa-star {
  color: #ffb400;
  opacity: 0.3;
}

/* Filled stars - brighter color and glow effect */
.star-rating .fas.fa-star {
  color: #ffcc00; /* Brighter gold color */
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(255, 204, 0, 0.7));
  transform: scale(1.05); /* Slightly larger */
}

/* Hover effects for stars - brighten and add glow */
.rating-option:hover .far.fa-star {
  opacity: 0.8;
  filter: drop-shadow(0 0 5px rgba(255, 180, 0, 0.4));
  transform: scale(1.05);
}

/* Selected stars - more pronounced */
.star-rating i.selected {
  color: #ffcc00; /* Brighter gold color */
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.8));
  transform: scale(1.1); /* Make them even larger when selected */
}

/* Star numbers */
.star-rating .rating-option div {
  font-weight: bold;
  font-size: 14px;
  color: #555;
  margin-top: 4px;
  text-align: center;
}

/* Rating value display */
#rating-value {
  font-weight: 500;
  color: #555;
  margin-top: 10px;
  height: 24px;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
  .star-rating i {
    font-size: 45px; /* Increased from 40px */
  }
  
  .star-rating .rating-option {
    padding: 6px;
  }
}

/* Star numbers */
.star-rating .rating-option div {
  font-weight: bold;
  margin-top: 2px;
  color: #555;
}

.reviewer-for {
  font-style: italic;
  margin-top: 5px;
  font-size: 0.9rem;
}

.flight-info {
  font-weight: 500;
}

/* Review Display */
.reviews-section {
  margin-top: 30px;
}

.review-card {
  border-radius: 10px;
  border: 1px solid var(--border-light);
  margin-bottom: 15px;
  padding: 20px;
  background-color: var(--bg-light);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.reviewer-info {
  font-weight: 500;
}

.review-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.review-stars {
  color: #ffb400;
}

.review-content {
  margin-bottom: 15px;
  line-height: 1.6;
}

.review-flight-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* Reviews Scroll Container */
.reviews-scroll-container {
  max-height: 350px;
  overflow-y: auto;
  padding-right: 5px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.reviews-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.reviews-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.reviews-scroll-container::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.reviews-scroll-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

/* Modal Styles - Fix for modal display issues */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 0.5;
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.3rem - 1px);
  border-top-right-radius: calc(0.3rem - 1px);
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: calc(0.3rem - 1px);
  border-bottom-left-radius: calc(0.3rem - 1px);
}

.modal-open {
  overflow: hidden;
}

.modal-open .modal {
  overflow-x: hidden;
  overflow-y: auto;
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px;
    margin: 1.75rem auto;
  }
  
  .modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
  }
}

/* Close button */
.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em 0.25em;
  color: #000;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  opacity: 0.5;
  cursor: pointer;
}

.btn-close:hover {
  color: #000;
  text-decoration: none;
  opacity: 0.75;
}

.btn-close:focus {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  opacity: 1;
}

/* Message notification badge */
.message-notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
