/* styles-additions-v7.css — Sprint 2.3
   Touch detail modal + Dashboard activity stream */


/* ===== Dashboard Activity Stream ===== */
.dash-activity {
  background: transparent;
}

.dash-activity-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #ebe7df;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dash-activity-tab {
  background: transparent;
  border: 0;
  padding: 8px 14px 10px;
  font: inherit;
  font-size: 13px;
  color: #888780;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}
.dash-activity-tab:hover { color: #1a1a1a; }
.dash-activity-tab-active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
  font-weight: 500;
}
.dash-activity-tab-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: #b3b0a6;
  font-weight: 400;
}
.dash-activity-tab-active .dash-activity-tab-count { color: #888780; }

.dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-activity-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: #b3b0a6;
  background: #f7f5f1;
  border-radius: 6px;
}

.dash-activity-row {
  display: flex;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f3f0e9;
}
.dash-activity-row:hover { background: #f7f5f1; }
.dash-activity-row:last-child { border-bottom: 0; }

.dar-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ebe7df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #6b6960;
}
.dar-meta { flex: 1; min-width: 0; }
.dar-line-1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b6960;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.dar-account {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 13px;
}
.dar-channel {
  font-weight: 500;
  color: #1a1a1a;
}
.dar-direction { color: #b3b0a6; }
.dar-date { color: #888780; }
.dar-contact { color: #1F5D9D; font-size: 11px; }
.dar-body {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dar-empty { color: #b3b0a6; }

.dash-activity-loadmore {
  margin-top: 12px;
  width: 100%;
  background: transparent;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  padding: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: #1a1a1a;
}
.dash-activity-loadmore:hover {
  background: #f7f5f1;
  border-color: #1a1a1a;
}
.dash-activity-more-note {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #b3b0a6;
  font-style: italic;
}


/* ===== Touch Detail Modal ===== */
.tdm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  z-index: 9300;  /* above other modals so chain navigation works */
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
}
.tdm-overlay.tdm-open { display: flex; }

.tdm-modal {
  background: #fdfcf9;
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  overflow: hidden;
  font-family: 'IBM Plex Sans', sans-serif;
}

.tdm-content { display: flex; flex-direction: column; }

.tdm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #ebe7df;
}
.tdm-header-text { flex: 1; min-width: 0; padding-right: 12px; }

.tdm-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tdm-icon {
  font-size: 20px;
  color: #6b6960;
}
.tdm-title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
}
.tdm-direction-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6b6960;
  background: #f3f0e9;
  padding: 3px 8px;
  border-radius: 4px;
}

.tdm-subtitle {
  font-size: 14px;
  color: #6b6960;
  margin-bottom: 6px;
}
.tdm-subtitle strong { color: #1a1a1a; font-weight: 600; }

.tdm-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tdm-date {
  font-size: 13px;
  color: #888780;
}
.tdm-status-completed {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #1D9E75;
  background: #E1F5EE;
  padding: 3px 8px;
  border-radius: 4px;
}

.tdm-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  color: #888780;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.tdm-close:hover { color: #1a1a1a; }

/* Sections */
.tdm-section {
  padding: 18px 24px;
  border-bottom: 1px solid #f3f0e9;
}
.tdm-section:last-of-type { border-bottom: 0; }

.tdm-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.tdm-section-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888780;
}
.tdm-section-count {
  display: inline-block;
  margin-left: 4px;
  color: #b3b0a6;
  font-weight: 500;
}

.tdm-edit-body, .tdm-plan-followup {
  background: transparent;
  border: 1px solid #d8d6d0;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  color: #6b6960;
}
.tdm-edit-body:hover, .tdm-plan-followup:hover {
  background: #f7f5f1;
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.tdm-body {
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.5;
  white-space: pre-wrap;
}
.tdm-empty { color: #b3b0a6; font-style: italic; }

/* Inline edit */
.tdm-body-edit { display: flex; flex-direction: column; gap: 8px; }
.tdm-body-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: #1a1a1a;
  font-family: 'IBM Plex Sans', sans-serif;
  resize: vertical;
  line-height: 1.5;
}
.tdm-body-textarea:focus {
  outline: 2px solid #378ADD;
  outline-offset: -1px;
  border-color: transparent;
}
.tdm-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.tdm-edit-cancel, .tdm-edit-save {
  padding: 6px 12px;
  border-radius: 5px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
}
.tdm-edit-cancel {
  background: #fff;
  color: #1a1a1a;
  border-color: #d8d6d0;
}
.tdm-edit-cancel:hover { background: #f7f5f1; }
.tdm-edit-save { background: #1a1a1a; color: #fff; }
.tdm-edit-save:hover { background: #2a2a2a; }
.tdm-edit-save:disabled { opacity: 0.6; cursor: not-allowed; }

/* Touch references (parent + children) */
.tdm-touch-ref {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f0e8d3;
  border-radius: 6px;
  background: #fdfaf3;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  margin-bottom: 6px;
}
.tdm-touch-ref:hover {
  background: #faf3e3;
  border-color: #C49B3A;
}
.tdm-touch-ref-arrow {
  flex: 0 0 18px;
  font-size: 16px;
  color: #888780;
  text-align: center;
  font-weight: 600;
}
.tdm-touch-ref-content { flex: 1; min-width: 0; }
.tdm-touch-ref-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #6b6960;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.tdm-touch-ref-date { color: #888780; }
.tdm-touch-ref-body {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.4;
}

.tdm-empty-followups {
  font-size: 13px;
  color: #b3b0a6;
  padding: 12px;
  text-align: center;
  background: #f7f5f1;
  border-radius: 6px;
  font-style: italic;
}

.tdm-followups {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Meta details */
.tdm-meta-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 13px;
}
.tdm-meta-list dt {
  color: #888780;
  font-weight: 500;
}
.tdm-meta-list dd {
  margin: 0;
  color: #1a1a1a;
}

.tdm-attachments-coming {
  font-size: 13px;
  color: #b3b0a6;
  padding: 16px;
  text-align: center;
  background: #f7f5f1;
  border-radius: 6px;
  font-style: italic;
}

/* Footer */
.tdm-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid #ebe7df;
  background: #fdfcf9;
}
.tdm-spacer { flex: 1; }
.tdm-btn-delete, .tdm-btn-close {
  padding: 9px 18px;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
}
.tdm-btn-delete {
  background: transparent;
  color: #993C1D;
  border-color: #FAECE7;
}
.tdm-btn-delete:hover { background: #FAECE7; }
.tdm-btn-close {
  background: #1a1a1a;
  color: #fff;
}
.tdm-btn-close:hover { background: #2a2a2a; }


/* ===== Touch row enhancements (chain indicator + arrow) ===== */
.tcpr-chain {
  display: inline-block;
  font-size: 11px;
  color: #C49B3A;
  margin-right: 2px;
  cursor: help;
}
.tcpr-arrow {
  flex: 0 0 16px;
  color: #d8d6d0;
  font-size: 18px;
  align-self: center;
  font-weight: 300;
  transition: color 0.12s, transform 0.12s;
}
.tcpanel-touch-row:hover .tcpr-arrow {
  color: #1a1a1a;
  transform: translateX(2px);
}


/* ===== Smart context strip — make it look clickable ===== */
.tm-context-strip {
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.tm-context-strip:hover {
  background: #faf3e3;
  border-color: #C49B3A;
}
.tm-context-strip-cta {
  font-weight: 500;
  color: #C49B3A;
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
}
