/* 132b: formulario de contacto.html (#mensaje). Los mensajes quedan en Supabase (sin correo). Todo viene en el HTML:
   al saber la sesión solo cambian textos, hidden y disabled; el textarea tiene alto fijo y la línea de estado y la fila
   de botones reservan su lugar, así que nada se mueve. Celular: una columna y botones a lo ancho. */
.contact-box {
  margin: 32px 0 8px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.legal-page .contact-box h2 {
  margin-top: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--text-muted);
  font-size: var(--type-body);
  font-weight: 600;
}

.contact-field select,
.contact-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: var(--type-body);
  font-weight: 400;
}

.contact-field textarea {
  height: calc(5 * 1.5em + 22px);
  line-height: 1.5;
  resize: none;
}

.contact-field select:disabled,
.contact-field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.legal-page .contact-count {
  margin: -6px 0 0;
  text-align: right;
  color: var(--text-muted);
  font-size: var(--type-body);
}

.legal-page .contact-state {
  min-height: 3em;
  margin: 0;
  color: var(--text);
}

.legal-page .contact-state[data-tone="ok"] {
  color: var(--cyan);
}

.legal-page .contact-state[data-tone="warn"] {
  color: var(--gold);
}

.legal-page .contact-state[data-tone="error"] {
  color: var(--danger);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 48px;
}

.contact-sent {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.contact-sent > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--cyan);
  font-weight: 600;
  cursor: pointer;
}

.contact-sent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.contact-sent-meta {
  display: block;
  color: var(--text-muted);
  font-size: var(--type-body);
}

.legal-page .contact-sent-body {
  margin: 4px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.game-shell[data-layout="mobile"] .contact-box {
  margin: 24px 0 8px;
  padding: 16px;
}

.game-shell[data-layout="mobile"] .contact-row {
  grid-template-columns: 1fr;
}

.game-shell[data-layout="mobile"] .legal-page .contact-state {
  min-height: 4.5em;
}

.game-shell[data-layout="mobile"] .contact-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}
