/* ============================================
   MapleMarket — Trust Signals
   css/components/trust-signals.css
   Shared styles for trust badges, safety tips,
   conversation safety bar, and safe-messaging notes.
   Tones match the MapleMarket orange-on-white palette.
   ============================================ */

/* ---- Listing card pill ---- */
.mm-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 7px;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.3;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mm-trust-pill svg { flex-shrink: 0; }
.mm-trust-pill > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.mm-trust-pill-verified {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.mm-trust-pill-business {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}
.mm-trust-pill-new {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

/* Wrapper used inside a card to anchor a single pill below the title */
.mm-trust-pill-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  min-width: 0;
}

/* ---- Detail-page badge row (seller card) ---- */
.mm-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.mm-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 999px;
  white-space: nowrap;
}
.mm-trust-badge svg { flex-shrink: 0; }
.mm-trust-badge-verified {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.mm-trust-badge-business {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.mm-trust-badge-new {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.mm-trust-badge-neutral {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* ---- Meta line (response time, etc.) ---- */
.mm-trust-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
}
.mm-trust-meta-line svg {
  flex-shrink: 0;
  color: #f59e0b;
  opacity: 0.9;
}

/* ---- Safe messaging note (seller card) ---- */
.mm-safe-msg-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 14px 0;
  padding: 9px 11px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
}
.mm-safe-msg-note svg {
  flex-shrink: 0;
  color: #f97316;
  margin-top: 1px;
}

/* ---- Safety tips block (listing detail page) ---- */
.mm-safety-tips {
  margin: 24px 0 8px;
  padding: 18px 18px 14px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.mm-safety-tips-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.mm-safety-tips-header svg {
  color: #f97316;
  flex-shrink: 0;
}
.mm-safety-tips-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}
.mm-safety-tips-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
@media (min-width: 900px) {
  /* Show two columns only on wider standalone usage (rare — safety tips
     usually sits inside a ~250px sidebar). */
  .mm-safety-tips.is-wide .mm-safety-tips-list {
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
  }
}
.mm-safety-tips-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
}
.mm-safety-tips-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
}
.mm-safety-tips-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.mm-safety-tips-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c2410c;
  text-decoration: none;
}
.mm-safety-tips-link:hover {
  color: #9a3412;
  text-decoration: underline;
}

/* ---- Conversation safety bar (messages page) ---- */
.mm-conv-safety {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  flex-shrink: 0;
}
.mm-conv-safety-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffedd5;
  color: #c2410c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mm-conv-safety-text {
  flex: 1;
  min-width: 0;
}
.mm-conv-safety-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7c2d12;
  line-height: 1.3;
}
.mm-conv-safety-body {
  font-size: 0.72rem;
  color: #92400e;
  line-height: 1.4;
  margin-top: 2px;
}
.mm-conv-safety-action {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #c2410c;
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #ffffff;
  white-space: nowrap;
}
.mm-conv-safety-action:hover {
  background: #fff7ed;
  border-color: #fdba74;
}

/* ---- Mobile tweaks ---- */
@media (max-width: 640px) {
  .mm-safety-tips {
    margin: 18px 0 6px;
    padding: 14px 14px 12px;
  }
  .mm-safety-tips-list li { font-size: 0.8rem; }

  .mm-conv-safety {
    padding: 8px 12px;
    gap: 10px;
  }
  .mm-conv-safety-icon { width: 24px; height: 24px; }
  .mm-conv-safety-icon svg { width: 12px; height: 12px; }
  .mm-conv-safety-title { font-size: 0.74rem; }
  .mm-conv-safety-body { font-size: 0.68rem; }
  .mm-conv-safety-action { padding: 5px 8px; font-size: 0.68rem; }

  .mm-trust-pill { font-size: 0.62rem; padding: 2px 6px; }
  .mm-trust-badge { font-size: 0.66rem; padding: 2px 8px; }
}

/* Very small screens — wrap conversation bar */
@media (max-width: 420px) {
  .mm-conv-safety {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .mm-conv-safety-text { flex-basis: calc(100% - 40px); }
  .mm-conv-safety-action { margin-left: 40px; }
}
