/* ============================================================
   Pilot Page Styles  (pilot_page.js hydration targets)
   ============================================================ */

/* ---- Data-not-yet-loaded notice ---- */
.pilot-data-notice {
  font-style: italic;
  color: #999;
  font-size: 0.85rem;
  margin: 1rem 0;
}

/* ---- Focus area chips ---- */
.pilot-focus-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.pilot-focus-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
  background: #e8f5e9;
  color: #2e7d32;
}

/* ---- Update cards ---- */
.pilot-update-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #78909c;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-left-color 0.15s ease;
  font-family: inherit;
  font-size: inherit;
}

.pilot-update-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.update-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

/* Type badges */
.update-type-badge {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: #78909c;
}

.update-type-general   { background: #78909c; }
.update-type-milestone { background: #388e3c; }
.update-type-lesson    { background: #f9a825; color: #333; }
.update-type-asset     { background: #7b1fa2; }
.update-type-event     { background: #0097a7; }

.update-date {
  font-size: 0.65rem;
  color: #999;
}

.update-title {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
}

.update-authors {
  font-size: 0.65rem;
  color: #888;
  margin: 0 0 0.2rem;
}

.update-summary {
  font-size: 0.78rem;
  color: #555;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Modal ---- */
#pilot-update-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

#pilot-update-modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 720px;
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  z-index: 1001;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  transition: background 0.1s ease;
}

.modal-close:hover {
  background: #f0f0f0;
  color: #222;
}

/* Prose inside modal */
.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4 {
  margin: 1.2rem 0 0.5rem;
  line-height: 1.3;
}

.modal-body h1 { font-size: 1.3rem; }
.modal-body h2 { font-size: 1.1rem; }
.modal-body h3 { font-size: 0.95rem; }
.modal-body h4 { font-size: 0.85rem; }

.modal-body p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
  color: #333;
}

.modal-body ul,
.modal-body ol {
  font-size: 0.85rem;
  line-height: 1.6;
  padding-left: 1.5rem;
  margin: 0 0 0.75rem;
}

.modal-body code {
  font-size: 0.8rem;
  background: #f5f5f5;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

.modal-body pre {
  background: #f5f5f5;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 0 0 0.75rem;
}

.modal-body pre code {
  background: none;
  padding: 0;
  font-size: 0.78rem;
}

.modal-body a {
  color: #1976d2;
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

/* ---- Tag chips on cards ---- */
.update-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.update-tag-chip {
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #bbdefb;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  font-family: inherit;
  line-height: 1.4;
}

.update-tag-chip:hover {
  background: #bbdefb;
}

.update-tag-chip.active {
  background: #1565c0;
  color: #fff;
  border-color: #1565c0;
}

/* ---- Filter bar ---- */
#pilot-updates-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.filter-bar-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.15rem;
}

/* ---- Modal header ---- */
.modal-header {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  padding-right: 2rem; /* clear the close button */
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.35rem 0 0.2rem;
  color: #222;
  line-height: 1.3;
}

.modal-date {
  font-size: 0.7rem;
  color: #999;
}

.modal-authors {
  font-size: 0.7rem;
  color: #888;
  margin: 0;
}

/* ---- Feed filter bar (aggregated feed page) ---- */
.feed-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.feed-filter-bar select {
  font-size: 0.75rem;
  font-family: inherit;
  padding: 0.25rem 0.5rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.feed-filter-bar select:focus {
  outline: none;
  border-color: #1565c0;
}

/* ---- Pilot name chip (feed cards) ---- */
.pilot-name-chip {
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  background: #f5f5f5;
  color: #555;
  border: 1px solid #e0e0e0;
}

/* ---- Feed card as anchor ---- */
a.pilot-update-card {
  text-decoration: none;
  display: block;
  color: inherit;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .modal-panel {
    max-height: 90vh;
    padding: 1rem;
  }
}
