/* file: static/weaver.css */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #050814;
  --bg-elevated: #0c1020;
  --border-soft: #232845;
  --accent: #ff7a3c;
  --accent-soft: rgba(255, 122, 60, 0.1);
  --text: #f5f5ff;
  --text-muted: #a3a8c3;
  --danger: #ff4b6a;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
  --transition-fast: 0.18s ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at top left, #1b2140 0, #050814 42%);
  color: var(--text);
}

#app {
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

/* Top bar */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.top-bar h1 {
  font-size: 28px;
  letter-spacing: 0.08em;
  margin: 0;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(10, 15, 40, 0.88);
  color: var(--text-muted);
}

/* Layout */

.layout {
  display: grid;
  gap: 18px;
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: 1.1fr 1fr;
    align-items: flex-start;
  }
}

.column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cards */

.card {
  background: linear-gradient(145deg, rgba(15, 19, 40, 0.98), rgba(6, 10, 26, 0.98));
  border-radius: var(--radius-xl);
  padding: 18px 18px 16px;
  border: 1px solid rgba(161, 173, 255, 0.07);
  box-shadow: var(--shadow-soft);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Inputs */

.input-textarea {
  width: 100%;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(4, 7, 22, 0.95);
  color: var(--text);
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.input-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 122, 60, 0.4);
  background: rgba(3, 7, 20, 0.98);
}

/* Buttons */

.btn {
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast), opacity 0.15s;
}

.btn.primary {
  background: linear-gradient(135deg, #ff7a3c, #ffa851);
  color: #120808;
  box-shadow: 0 12px 30px rgba(255, 122, 60, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(255, 122, 60, 0.45);
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(255, 122, 60, 0.5);
}

.btn.secondary:hover {
  background: rgba(255, 122, 60, 0.09);
}

.btn.tertiary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Small things */

.actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.error-message {
  margin-top: 8px;
  font-size: 12px;
  color: var(--danger);
}

.small-status {
  font-size: 12px;
  color: var(--text-muted);
}

/* Pills */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pill-soft {
  background: rgba(255, 255, 255, 0.04);
}

/* Classification */

#classificationInfo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(161, 173, 255, 0.25);
  background: rgba(22, 26, 60, 0.85);
  font-size: 11px;
}

.badge-label {
  color: var(--text-muted);
  margin-right: 4px;
}

/* Questions */

.question-block {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 10px 10px 8px;
  background: rgba(9, 12, 28, 0.94);
  margin-bottom: 10px;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.question-label {
  font-size: 13px;
  font-weight: 500;
}

.question-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.question-help {
  font-size: 11px;
  margin: 4px 0 6px;
  color: var(--text-muted);
}

.question-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  gap: 8px;
}

.suggestion-button {
  font-size: 11px;
  padding: 4px 9px;
}

/* Suggestions */

.suggestions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* AQUÍ CAMBIA LA LEGIBILIDAD DE LAS SUGERENCIAS */
.suggestion-pill {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ff7a3c;            /* fondo naranja sólido */
  color: #1b0a04;                 /* texto oscuro, mucho contraste */
  border: 1px solid #ffb587;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast), color var(--transition-fast);
}

.suggestion-pill:hover {
  background: #ff944f;            /* un pelín más claro al hover */
  color: #120602;
  transform: translateY(-0.5px);
  box-shadow: 0 4px 14px rgba(255, 122, 60, 0.55);
}

/* Preview */

.card-preview {
  min-height: 260px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.preview-body {
  margin-top: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(5, 8, 20, 0.96);
  border: 1px solid rgba(61, 70, 120, 0.6);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Final briefings */

.card-final {
  margin-top: 6px;
}

.final-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.final-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(8, 10, 26, 0.9);
  border: 1px solid rgba(86, 92, 148, 0.7);
}

.btn-toggle {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.btn-toggle.active {
  background: rgba(255, 122, 60, 0.95);
  color: #1d0c05;
  transform: translateY(-0.5px);
}

.final-body {
  border-radius: 12px;
  background: rgba(5, 8, 20, 0.98);
  border: 1px solid rgba(61, 70, 120, 0.7);
  padding: 10px 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 360px;
  overflow-y: auto;
}

.final-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
