/* Activity Panel — slide-out unified portfolio event feed */

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.afp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9200;
  display: none;
}
.afp-overlay.open { display: block; }

/* ── Panel ───────────────────────────────────────────────────────────────── */
.afp-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: #fff;
  box-shadow: -4px 0 40px rgba(0, 0, 0, 0.18);
  z-index: 9201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.afp-panel.open { transform: translateX(0); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.afp-header {
  padding: 20px 20px 0;
  border-bottom: 1px solid #e0e0dc;
  flex-shrink: 0;
  background: #fff;
}
.afp-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.afp-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -0.2px;
}
.afp-close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #6b6b6b;
  transition: background 0.15s;
}
.afp-close-btn:hover { background: #f5f4f0; color: #0a0a0a; }

/* ── Controls row (day selector) ─────────────────────────────────────────── */
.afp-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.afp-day-select {
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: #0a0a0a;
  background: #f5f4f0;
  border: 1px solid #e0e0dc;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.afp-day-select:focus { border-color: #1a5c2a; }

/* ── Filter chips ────────────────────────────────────────────────────────── */
.afp-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.afp-filters::-webkit-scrollbar { display: none; }
.afp-chip {
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid #e0e0dc;
  background: #fff;
  color: #6b6b6b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.afp-chip:hover { background: #f5f4f0; color: #0a0a0a; }
.afp-chip.active {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}

/* ── Body ────────────────────────────────────────────────────────────────── */
.afp-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* ── Loading / empty ─────────────────────────────────────────────────────── */
.afp-loading, .afp-empty {
  padding: 48px 20px;
  text-align: center;
  color: #6b6b6b;
  font-size: 14px;
  line-height: 1.6;
}
.afp-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.afp-empty-sub {
  font-size: 12px;
  color: #9e9e9e;
  margin-top: 6px;
}

/* Skeleton loading cards */
.afp-skeleton-card {
  padding: 14px 20px;
  border-bottom: 1px solid #e0e0dc;
}
.afp-skel-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0ec 25%, #e8e8e4 50%, #f0f0ec 75%);
  background-size: 400% 100%;
  animation: afp-shimmer 1.4s ease infinite;
  margin-bottom: 8px;
}
.afp-skel-line.wide  { width: 65%; }
.afp-skel-line.mid   { width: 45%; }
.afp-skel-line.short { width: 30%; }
@keyframes afp-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ── Date separator ──────────────────────────────────────────────────────── */
.afp-date-sep {
  padding: 10px 20px 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: #9e9e9e;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #fafaf8;
  border-bottom: 1px solid #f0f0ec;
}

/* ── Event card ──────────────────────────────────────────────────────────── */
.afp-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0ec;
  transition: background 0.12s;
  cursor: default;
}
.afp-card:last-child { border-bottom: none; }
.afp-card:hover { background: #fafaf8; }

/* Icon badge */
.afp-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}
.afp-icon.signal     { background: #e8f5e9; }
.afp-icon.alert      { background: #fff3e0; }
.afp-icon.note       { background: #e8eaf6; }
.afp-icon.investment { background: #fce4ec; }

/* Card content */
.afp-card-body {
  flex: 1;
  min-width: 0;
}
.afp-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.afp-company-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #0a0a0a;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.afp-company-name:hover { color: #1a5c2a; text-decoration: underline; }
.afp-timestamp {
  font-size: 11px;
  color: #9e9e9e;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Summary */
.afp-summary {
  font-size: 13px;
  color: #3a3a3a;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Type badge */
.afp-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-top: 5px;
}
.afp-type-badge.signal     { background: #e8f5e9; color: #1a5c2a; }
.afp-type-badge.alert      { background: #fff3e0; color: #e65100; }
.afp-type-badge.note       { background: #e8eaf6; color: #3949ab; }
.afp-type-badge.investment { background: #fce4ec; color: #c2185b; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .afp-panel { width: 100vw; }
}
