/* ── SECTION ── */
.cap-section { padding: 1.5rem 0 4rem; }

/* ── STATUS WARNING ── */
.cap-status-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FAEEDA;
  border: 1px solid #FAC775;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 1.25rem;
  font-size: 14px;
  color: #633806;
  line-height: 1.5;
}
.cap-status-icon { display: inline-flex; align-items: center; width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.cap-status-icon svg { width: 18px; height: 18px; fill: #854F0B; }

/* ── REFERENCE ALERTS ── */
.cap-references {
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px 16px;
}
.cap-ref-label { font-size: 14px; color: #888; margin-bottom: 10px; }
.cap-ref-list  { display: flex; flex-direction: column; gap: 6px; }
.cap-ref-item  { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 5px 0; border-bottom: 1px solid #f8f8f8; }
.cap-ref-item:last-child { border-bottom: none; }
.cap-ref-dot   { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; border: 2px solid; }
.cap-ref-title { font-size: 14px; font-weight: 500; color: var(--primary-color); }
.cap-ref-date  { font-size: 14px; color: #aaa; margin-top: 1px; }

/* ── PAGE HEADER ── */
.cap-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.cap-page-eyebrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.cap-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  margin: 0;
  max-width: 640px;
}

/* SHARE ROW */
.cap-share-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.cap-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #eee;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  background: #fff;
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.cap-share-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.cap-share-btn .icon { display: inline-flex; align-items: center; width: 14px; height: 14px; }
.cap-share-btn .icon svg { width: 14px; height: 14px; fill: currentColor; }
.cap-share-social .share-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.cap-share-social .button {
  border-radius: 20px !important;
  font-size: 11px !important;
  height: auto !important;
  padding: 5px 12px !important;
  border-color: #eee !important;
  color: #555 !important;
  background: #fff !important;
  transition: border-color 0.12s, color 0.12s !important;
}
.cap-share-social .button:hover { border-color: var(--primary-color) !important; color: var(--primary-color) !important; }

/* ── MAIN CARD ── */
.cap-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* ── LAYOUT: sidebar left, right col ── */
.cap-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 560px;
}

/* ══════════════════════
   LEFT SIDEBAR
══════════════════════ */
.cap-sidebar {
  border-right: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  overflow-y: auto;
}

/* SEVERITY BADGE */
.cap-sb-severity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.cap-sb-sev-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.08);
  transition: background 0.2s, color 0.2s;
}
.cap-sb-sev-icon svg { width: 18px; height: 18px; fill: currentColor; }
.cap-sb-sev-event { font-size: 14px; font-weight: 600; color: #1a1a1a; line-height: 1.3; }
.cap-sb-sev-label { font-size: 14px; color: #888; margin-top: 2px; }

/* META ROWS */
.cap-sb-meta {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cap-sb-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  font-size: 14px;
}
.cap-sb-meta-icon { display: inline-flex; align-items: center; width: 13px; height: 13px; flex-shrink: 0; }
.cap-sb-meta-icon svg { width: 13px; height: 13px; fill: var(--primary-color); }
.cap-sb-meta-lbl { color: #888; flex: 1; font-size: 14px; }
.cap-sb-meta-val { font-weight: 500; color: #1a1a1a; font-size: 14px; text-align: right; }

/* SIDEBAR SECTIONS */
.cap-sb-section {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cap-sb-section:last-child { border-bottom: none; }
.cap-sb-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* SIDEBAR TIMELINE */
.cap-sb-timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cap-sb-tl-item  { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; }
.cap-sb-tl-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--primary-color); flex-shrink: 0; margin-top: 3px; }
.cap-sb-tl-type  { font-weight: 600; color: #333; margin-right: 4px; }
.cap-sb-tl-val   { color: #666; }

/* SIDEBAR LEGEND */
.cap-sb-legend      { display: flex; flex-direction: column; gap: 5px; }
.cap-sb-legend-item { display: flex; align-items: center; gap: 7px; font-size: 14px; color: #555; }
.cap-sb-legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid rgba(0,0,0,0.12); }

/* ══════════════════════
   RIGHT COLUMN
══════════════════════ */
.cap-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* MAP */
.cap-map-wrap { flex-shrink: 0; border-bottom: 1px solid #f0f0f0; }
.cap-map { height: 360px; width: 100%; display: block; }

/* UNDERLINE TABS */
.cap-tab-strip {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid #eee;
  background: #fff;
  flex-shrink: 0;
}
.cap-tab-strip::-webkit-scrollbar { display: none; }

.cap-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.12s, border-color 0.12s;
}
.cap-tab:hover { color: #333; background: #f8f9fb; }
.cap-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }

.cap-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cap-tab-icon svg { width: 11px; height: 11px; fill: currentColor; }
.cap-tab-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid rgba(0,0,0,0.15); }
.cap-tab-label { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* TAB CONTENT */
.cap-right-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  background: #f8f9fb;
}

.cap-detail-panel { display: flex; flex-direction: column; gap: 14px; }
.cap-detail-panel.is-hidden { display: none; }

.cap-detail-headline {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
  margin: 0;
}

.cap-detail-section { display: flex; flex-direction: column; gap: 5px; }
.cap-detail-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.cap-detail-text { font-size: 14px; color: #444; line-height: 1.7; margin: 0; }

/* hidden marker source element */
.cap-severity-icon.is-hidden { display: none; }

/* MAP MARKER */
.cap-event-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.cap-event-marker svg { width: 18px; height: 18px; fill: currentColor; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .cap-layout { grid-template-columns: 180px 1fr; }
}

@media (max-width: 768px) {
  .cap-section     { padding: 1rem 0 3rem; }
  .cap-page-title  { font-size: 16px; }
  .cap-page-header { flex-direction: column; gap: 0.75rem; }

  .cap-layout {
    grid-template-columns: 1fr;
  }

  .cap-sidebar {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
  }

  .cap-map { height: 240px; }
  .cap-right-content { padding: 12px 14px; }
}

@media (max-width: 480px) {
  .cap-page-title { font-size: 14px; }
  .cap-tab        { padding: 8px 12px; font-size: 14px; }
}