/*
 * SOTIE Conecta · módulos comerciales (cotizaciones y resultados).
 * Usa los mismos tokens del diseño aprobado (--panel, --line, --gold, --muted).
 */

/* Solicitar cotización (ficha del negocio) */
.quote-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); position: relative; }
.quote-box h2 { margin-bottom: 4px; }
.quote-box .muted { font-size: .8125rem; margin-bottom: 12px; }
.quote-box .field { margin-bottom: 12px; }
.quote-box button.primary { width: 100%; }
.quote-box .error-box { padding: 10px 12px; margin: 0 0 12px; border: 1px solid #a95d55; border-radius: 9px; font-size: .8125rem; }
.quote-box .error-box[hidden] { display: none; }

/* Resultados del negocio */
.info-note { font-size: .8125rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 9px; padding: 8px 12px; }

.period { justify-self: start; display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #071f26; }
.period a { padding: 6px 14px; border-radius: 999px; font-size: .8125rem; color: var(--muted); }
.period a.current { background: var(--panel2); color: var(--gold); font-weight: 650; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(110deg, #0b252c, #0c2930); min-width: 0; }
.stat span { font-size: .75rem; color: var(--muted); }
.stat strong { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat small { font-size: .7rem; color: var(--muted); }
.stat.accent { border-color: #9d81375e; }
.stat.accent strong { color: var(--gold); }

.chart-panel h2 { margin-bottom: 10px; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bars span { flex: 1; min-width: 2px; height: max(var(--h), 2px); background: linear-gradient(180deg, var(--gold), #b8913f); border-radius: 3px 3px 0 0; opacity: .85; }
.bars span:hover { opacity: 1; }
.bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .7rem; margin-top: 4px; }

.quote-list { display: grid; gap: 10px; }
.quote-item { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #0c282f; min-width: 0; }
.quote-item.is-new { border-color: #9d81378a; box-shadow: inset 3px 0 0 var(--gold); }
.quote-item header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.quote-item p { margin: 8px 0; white-space: pre-line; overflow-wrap: anywhere; }
.quote-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.quote-actions .button, .quote-actions button { width: auto; margin: 0; }
.badge-status { font-size: .68rem; font-weight: 650; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge-status.s-new { color: var(--gold); border-color: #9d81376e; background: #d4aa5512; }
.badge-status.s-answered { color: #b8e3c9; border-color: #527761; }

.share { margin-top: 16px; }
.share-row { display: grid; gap: 8px; }
.share-row input { width: 100%; min-height: 44px; border: 1px solid #385760; border-radius: 9px; background: #071f26; color: var(--ink); padding: 10px 12px; font-size: .875rem; }

@media (min-width: 1000px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .stat { padding: 18px 20px; }
  .stat strong { font-size: 2.2rem; }
  .bars { height: 180px; gap: 4px; }
  .quote-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .share-row { grid-template-columns: 1fr auto auto; align-items: center; }
  .share-row .button, .share-row button { width: auto; margin: 0; }
}

/* Revista, comunidad y beneficios (contenido publicado desde el panel) */
.content-list { display: grid; gap: 12px; margin-top: 16px; }
.content-card { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0c282f; }
.content-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.content-card > div { padding: 14px; }
.content-card h3 { margin: 0 0 6px; }
.content-card p { margin: 0 0 10px; font-size: .875rem; }
.content-detail .hero-image { width: 100%; border-radius: 12px; margin: 12px 0 16px; aspect-ratio: 16 / 9; object-fit: cover; }
.content-body { white-space: pre-line; color: #cfdcdf; line-height: 1.7; margin-bottom: 20px; overflow-wrap: anywhere; }

/* Planes */
.plans-head p { max-width: 60ch; }
.plan-cards { display: grid; gap: 12px; margin-top: 16px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #0c282f; }
.plan-card.is-best { border-color: #c99b3f; box-shadow: inset 0 0 0 1px #c99b3f; }
.plan-flag { align-self: flex-start; font-size: .72rem; font-weight: 700; color: #1b1406; background: var(--gold); border-radius: 999px; padding: 3px 10px; }
.plan-card h2 { margin: 0; }
.plan-price { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.plan-price small { font-size: .85rem; font-weight: 500; letter-spacing: 0; }
.plan-card p { margin: 4px 0 12px; white-space: pre-line; }
.plan-card .button { margin-top: auto; width: 100%; }
.plans-note { font-size: .8125rem; margin-top: 16px; }
