/* ==========================================================================
   My activity (modules/features/my-activity.js)
   The app's filter bar, then visits grouped by day as a quiet list; a visit
   opens in the shared visit panel. One colour: the company tile.
   ========================================================================== */

.ma-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px 0 32px;
}

.ma-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Banner and toolbar ────────────────────────────────────────────────── */

.ma-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
  font-size: 13px;
  color: var(--text-secondary);
}

.ma-banner[hidden] {
  display: none;
}

.ma-banner > span {
  flex: 1;
  min-width: 0;
}

.ma-banner .ma-icon {
  color: var(--text-muted);
}

.ma-link {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.ma-toolbar {
  margin-bottom: 12px;
}

.ma-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ── Days and rows ─────────────────────────────────────────────────────── */

.ma-day {
  margin-top: 20px;
}

.ma-day:first-child {
  margin-top: 4px;
}

.ma-day-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 2px 8px;
}

.ma-day-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.ma-day-head span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.ma-list {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
}

.ma-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color-light);
  cursor: pointer;
  transition: background 0.12s ease;
}

.ma-row:first-child {
  border-top: 0;
}

.ma-row:hover {
  background: var(--bg-hover);
}

.ma-row:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.ma-row-tile {
  display: inline-flex;
  flex-shrink: 0;
  padding-top: 1px;
}

.ma-row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.ma-row-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.ma-row-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ma-type {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ma-row-time {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Contact · distance · lead score · fare · photo */
.ma-row-meta {
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.ma-row-meta > span:not(:last-child)::after {
  content: '·';
  margin: 0 7px;
}

.ma-row-notes {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.ma-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.ma-tag {
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--bg-tertiary);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ma-more {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* ── Loading and empty ─────────────────────────────────────────────────── */

.ma-row.is-loading {
  cursor: default;
}

.ma-skel {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: var(--bg-tertiary);
}

.ma-skel-tile {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}

.ma-row.is-loading .ma-row-main {
  gap: 8px;
  padding-top: 4px;
}

.ma-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px 16px;
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  text-align: center;
}

.ma-empty h3 {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.ma-empty p {
  max-width: 380px;
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.ma-empty .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ma-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ── Phones ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .ma-page {
    padding-top: 0;
  }

  .ma-row {
    padding: 12px;
    gap: 10px;
  }

  .ma-row-top {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .ma-row-name {
    min-width: 0;
    max-width: 100%;
  }
}
