/* assets/tei-messaging.css — anonymous experience communication thread */

.exp-status-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.in-communication-badge {
  color: var(--comm-purple, #7c5cbf) !important;
  font-size: 10.5px !important;
}

/* ---- Row layout: left column (arrow + business name/GSTIN) | body | status ---- */
.exp-entry-v2 {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.exp-left-col {
  flex-shrink: 0;
  width: 150px;
  padding-top: 8px; /* roughly aligns with the description text's baseline next to the arrow */
}
.exp-left-col .exp-biz-name {
  font-family: var(--mono, monospace);
  font-size: 12px;
  color: var(--muted, #6b6b6b);
  line-height: 1.45;
}

.exp-desc-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  flex-wrap: nowrap;
}
.exp-desc-row p {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.exp-thread-toggle-arrow {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  max-width: 32px;
  flex: 0 0 32px !important;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1.5px solid var(--line, #e3ddd4);
  background: var(--card, #fff);
  cursor: pointer;
  position: relative;
  padding: 0 !important;
  margin: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.exp-thread-toggle-arrow:hover {
  border-color: var(--accent, #8a4b2a);
  background: var(--paper-raised, #f7f4ee);
}
.exp-thread-toggle-arrow .exp-thread-toggle-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--accent, #8a4b2a);
  transition: transform 0.2s ease;
  display: block;
}
.exp-thread-toggle-arrow.is-open .exp-thread-toggle-icon {
  transform: rotate(180deg);
}
.exp-thread-new-dot-mini {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--stamp-red, #b23b3b);
  border: 2px solid var(--card, #fff);
}

.exp-thread-body {
  padding: 14px 0 4px 0;
  border-top: 1px solid var(--line, #e3ddd4);
  margin-top: 12px;
}
.exp-thread-body[hidden] { display: none; }

.exp-message {
  max-width: 78%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}
.exp-message-theirs {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e3ddd4);
  margin-right: auto;
  border-bottom-left-radius: 2px;
}
.exp-message-mine {
  background: var(--ledger-blue, #0053F5);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}
.exp-message-sender {
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-bottom: 4px;
}
.exp-message-text { white-space: pre-wrap; word-break: break-word; }
.exp-message-time {
  font-family: var(--mono, monospace);
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
}

.exp-thread-reply {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.exp-thread-reply textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e3ddd4);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
}
.exp-thread-reply button {
  align-self: flex-end;
}

.exp-thread-waiting {
  font-family: var(--mono, monospace);
  font-size: 11.5px;
  color: var(--muted, #6b6b6b);
  padding: 8px 0;
  font-style: italic;
}

/* My Businesses tab: whole row is a link, no separate button */
.biz-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 20px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e3ddd4);
  border-radius: 10px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.biz-row:hover,
.biz-row:focus-visible {
  border-color: var(--accent, #8a4b2a);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.biz-gstin-cell {
  font-family: var(--mono, monospace);
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--muted, #6b6b6b);
  text-transform: uppercase;
  flex: 0 0 auto;
  min-width: 180px;
  line-height: 1.4;
}
.biz-name-cell {
  font-family: var(--serif, 'Source Serif 4', serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink, #2b2620);
  flex: 1;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .biz-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .biz-gstin-cell { min-width: 0; font-size: 13px; }
  .biz-name-cell { font-size: 16px; }

  .exp-message { max-width: 92%; }
  .exp-thread-toggle-arrow { width: 36px; height: 36px; }
  .exp-entry-v2 { flex-wrap: wrap; }
  .exp-left-col { width: 100%; padding-top: 0; margin-bottom: 6px; }
}
