/* airports.css — light, calm styles for Aasmaan V2 airport pins + disruptions card. */

:root[data-theme="dark"] .aapt-card {
  background: rgba(17, 26, 42, 0.96);
  border-color: rgba(232, 238, 246, 0.16);
}
:root[data-theme="dark"] .aapt-title { color: #e8eef6; }
:root[data-theme="dark"] .aapt-name { color: #e8eef6; }
:root[data-theme="dark"] .aapt-city { color: #9fb0c3; }
:root[data-theme="dark"] .aapt-detail { color: #9fb0c3; }
:root[data-theme="dark"] .aapt-quiet { color: #6b7d94; }

/* ---- Map pins: blue airport markers, distinct from amber aircraft markers ---- */
.aapt-pin {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transform: translate(-6px, -6px); /* optical center on the dot */
}

.aapt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2563eb;                 /* calm blue, never amber */
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 40, 90, 0.35);
  flex: none;
}

/* Status ring colors on the dot */
.aapt-pin[data-status="delay"] .aapt-dot { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.45), 0 1px 4px rgba(15, 40, 90, 0.35); }
.aapt-pin[data-status="alert"] .aapt-dot { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.45), 0 1px 4px rgba(15, 40, 90, 0.35); }
.aapt-pin[data-status="ok"] .aapt-dot { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35), 0 1px 4px rgba(15, 40, 90, 0.35); }
.aapt-pin[data-status="sparse"] .aapt-dot { background: #9ca3af; box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.30), 0 1px 4px rgba(15, 40, 90, 0.35); }

/* Selected pin: highlighted ring */
.aapt-pin.sel .aapt-dot { box-shadow: 0 0 0 4px #fff, 0 0 0 7px #2563eb, 0 1px 6px rgba(15, 40, 90, 0.4); }

/* White IATA pill, Flighty-like */
.aapt-pill {
  font: 600 10.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  padding: 4px 7px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(15, 40, 90, 0.18);
}

/* Small temp/wind chip above the pin (weather toolbar toggle) */
.aapt-chip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font: 600 10px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 3px 7px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(15, 40, 90, 0.2);
  pointer-events: none;
}
.aapt-chip[hidden] { display: none; }

/* ---- Disruptions widget section (inside #widgets sidebar) ---- */
#disruptions {
  display: block;
  margin-bottom: 16px;
}
#disruptions:empty { display: none; }

.aapt-card {
  width: 100%;
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 52px; /* collapsed: header strip only */
  display: flex;
  flex-direction: column;
  transition: max-height 0.25s ease;
}
.aapt-card.open { max-height: 50vh; }
.aapt-card.clear { margin-bottom: 0; opacity: 0.92; }

.aapt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 10px;
  flex: none;
  /* reset when rendered as <button> toggle */
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.aapt-title {
  font: 700 15px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #0f172a;
}

.aapt-head-right { display: flex; align-items: center; gap: 8px; }

.aapt-upd {
  font: 500 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #94a3b8;
}

.aapt-live {
  font: 700 10px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #22c55e;
  border-radius: 999px;
  padding: 4px 9px;
}

.aapt-rows {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 8px 12px;
}

.aapt-row {
  display: grid;
  grid-template-columns: 10px 44px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 10px;
  width: 100%;
  background: none;
  border: none;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: left;
  cursor: pointer;
}
.aapt-row:hover { background: rgba(37, 99, 235, 0.06); }
.aapt-row[aria-current="true"] { background: rgba(37, 99, 235, 0.10); }
.aapt-row + .aapt-row { border-top: 1px solid rgba(148, 163, 184, 0.18); }

.aapt-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.aapt-iata {
  font: 700 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.03em;
  color: #1d4ed8;
}

.aapt-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aapt-name {
  font: 600 13px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aapt-city {
  font: 500 11px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #64748b;
}

.aapt-detail {
  font: 500 11.5px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #334155;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  grid-column: 1 / -1;
  grid-row: 2;
  padding-left: 20px;
}
.aapt-note {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.aapt-delay b { color: #b45309; font-weight: 700; }
.aapt-note { color: #92400e; font-weight: 600; }
.aapt-quiet { color: #94a3b8; }
.aapt-sparse { color: #6b7280; font-style: italic; font-size: 12px; }
.aapt-wx { display: block; color: #475569; font-weight: 600; }

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .aapt-pill { font-size: 9.5px; padding: 3px 6px; }
  .aapt-dot { width: 11px; height: 11px; }
  .aapt-card { max-height: 52vh; border-radius: 16px 16px 0 0; }
  .aapt-wx { display: inline; margin-left: 6px; }
}
