/* PreflightAI — App-specific styles */
/* Extends theme.css dark aviation theme */

/* UTILS */
.hidden { display: none !important; }

/* NAV */
.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }
.nav-spacer { flex: 1; }

/* BUTTONS */
.btn-ghost {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
  padding: 7px 16px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(245,158,11,0.4); }

.btn-primary {
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--amber);
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--amber-dim); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: rgba(245,158,11,0.4); }

.btn-full { width: 100%; }

.btn-brief {
  font-size: 15px;
  font-weight: 700;
  color: var(--bg);
  background: var(--amber);
  border: none;
  padding: 14px 32px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-brief:hover { background: var(--amber-dim); }
.btn-brief:active { transform: scale(0.98); }

.btn-refresh {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-refresh:hover { color: var(--text); border-color: rgba(245,158,11,0.4); }

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  width: 420px;
  max-width: calc(100vw - 32px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--text);
}
.modal-close {
  font-size: 24px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.form-group input:focus {
  outline: none;
  border-color: var(--amber);
}
.form-hint { font-weight: 400; color: var(--text-dim); }
.form-divider {
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  margin: 16px 0;
  position: relative;
}
.form-divider::before, .form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background: var(--border);
}
.form-divider::before { left: 0; }
.form-divider::after { right: 0; }
.form-switch { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 16px; }
.form-switch a { color: var(--amber); text-decoration: none; }
.form-switch a:hover { text-decoration: underline; }
.form-error {
  color: #EF4444;
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 4px;
  margin-bottom: 12px;
}
.form-success {
  color: #22C55E;
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 4px;
  margin-bottom: 12px;
}
.form-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }

/* HERO SEARCH */
.hero-search {
  padding: 80px 24px 60px;
  display: flex;
  justify-content: center;
}
.search-container {
  max-width: 640px;
  width: 100%;
  text-align: center;
}
.search-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.search-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.search-headline em { color: var(--amber); font-style: italic; }
.search-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
  font-weight: 300;
}
.search-box {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  margin-bottom: 16px;
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
.search-icon { flex-shrink: 0; }
#icao-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  text-transform: uppercase;
  padding: 12px 0;
}
#icao-input::placeholder { color: var(--text-dim); font-weight: 400; letter-spacing: 0.04em; }
.search-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
}
.hint-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-family: 'IBM Plex Sans', sans-serif;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}
.hint-chip:hover { border-color: var(--amber); color: var(--text); }

/* RESULTS */
.results-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  border-bottom: none;
}
.results-airport {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
#result-airport-code {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--amber);
  letter-spacing: 0.04em;
}
.results-name { font-size: 14px; color: var(--text-muted); }
.results-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-dim); }

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

.result-card {
  background: var(--surface);
  padding: 20px 24px;
}
.result-wide { grid-column: 1 / -1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}
.category-color { background: #22C55E; }
.taf-dot { background: #60A5FA; }
.notam-dot { background: #F97316; }
.tfr-dot { background: #EF4444; }
.fuel-dot { background: #A855F7; }

.card-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 2px;
}
.card-count {
  font-size: 11px;
  color: var(--text-dim);
}

.card-body { font-size: 13px; color: var(--text-muted); }

/* METAR */
.metar-raw {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  padding: 12px;
  background: var(--surface2);
  border-radius: 4px;
  margin-bottom: 12px;
  word-break: break-all;
  line-height: 1.8;
}
.metar-fields {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.metar-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.field-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.field-value { font-size: 15px; font-weight: 600; color: var(--text); font-family: 'IBM Plex Mono', monospace; }

/* TAF */
.taf-raw {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
  max-height: 200px;
  overflow-y: auto;
}

/* NOTAMs */
.notam-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}
.notam-item:last-child { border-bottom: none; }

/* TFRs */
.tfr-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.tfr-item:last-child { border-bottom: none; }
.tfr-icon { color: #EF4444; flex-shrink: 0; }
.tfr-info { flex: 1; min-width: 0; }
.tfr-title { color: var(--text); font-size: 12px; }
.tfr-date { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* FUEL */
.fuel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fuel-row:last-child { border-bottom: none; }
.fuel-fbo { font-size: 13px; color: var(--text); font-weight: 500; flex: 1; }
.fuel-prices { display: flex; gap: 12px; }
.fuel-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  font-family: 'IBM Plex Mono', monospace;
}
.fuel-updated { font-size: 10px; color: var(--text-dim); margin-left: 12px; }

/* EMPTY / LOADING */
.card-empty { color: var(--text-dim); font-size: 13px; padding: 8px 0; }
.loading-skeleton {
  height: 20px;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 3px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ERROR */
.error-box {
  background: var(--surface);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px;
  padding: 32px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.error-title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 8px;
}
.error-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* PRICING PAGE */
.pricing-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}
.pricing-header {
  text-align: center;
  margin-bottom: 48px;
}
.pricing-headline {
  font-family: 'DM Serif Display', serif;
  font-size: 48px;
  color: var(--text);
  margin-bottom: 12px;
}
.pricing-sub {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 300;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.pricing-card {
  background: var(--surface);
  padding: 28px 20px;
  text-align: center;
}
.pricing-card.featured {
  background: var(--surface2);
  border: 2px solid var(--amber);
}
.plan-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.featured .plan-name { color: var(--amber); }
.plan-price {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--text);
  margin-bottom: 4px;
}
.plan-price span { font-size: 16px; color: var(--text-dim); font-family: 'IBM Plex Sans', sans-serif; }
.plan-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.5; }
.plan-features { list-style: none; text-align: left; margin-bottom: 24px; }
.plan-features li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-features li::before {
  content: '✓';
  color: #22C55E;
  font-size: 12px;
  flex-shrink: 0;
}
.btn-plan {
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-plan-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-plan-outline:hover { border-color: var(--amber); color: var(--text); }
.btn-plan-solid {
  background: var(--amber);
  border: none;
  color: var(--bg);
}
.btn-plan-solid:hover { background: var(--amber-dim); }

/* FOOTER */
.app-footer {
  padding: 24px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.footer-logo { color: var(--text-muted); font-family: 'DM Serif Display', serif; }
.footer-sep { color: var(--text-dim); }
.footer-tagline { color: var(--text-dim); }
.footer-right { display: flex; gap: 16px; }
.footer-link { font-size: 13px; color: var(--text-dim); text-decoration: none; }
.footer-link:hover { color: var(--text-muted); }

/* MOBILE */
@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .app-footer { flex-direction: column; gap: 12px; text-align: center; }
  .search-box { flex-direction: column; }
  .results-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .results-grid { grid-template-columns: 1fr; }
  .result-wide { grid-column: 1; }
  .metar-fields { gap: 12px; }
}