/* =========================
   Generator Styling
   Styling for .generator-shell and stat blocks
   ========================= */

.generator-container {
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--overlay-medium);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
}

.stat-block {
  border: var(--border-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,.96);
  padding: 18px;
  margin-bottom: 18px;
}

.stat-block + .stat-block {
  margin-top: 16px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: var(--border-soft);
  border-radius: var(--radius);
  background: var(--overlay-light);
  margin-bottom: 10px;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.stat-label {
  flex: 1;
  font-weight: var(--font-weight-extra-bold);
  color: rgba(24,22,22,.88);
  font-size: .95rem;
}

.stat-value {
  flex: 1 1 auto;
  color: var(--text-secondary);
  font-weight: var(--font-weight-bold);
  font-size: .95rem;
}

/* Lock and reroll buttons */
.lock-btn,
.reroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--text-border);
  background: var(--overlay-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease);
  font-size: .9rem;
}

.lock-btn:hover,
.reroll-btn:hover {
  background: rgba(255,255,255,.96);
  border-color: rgba(94,101,114,.32);
  transform: translateY(-1px);
}

.lock-btn.locked {
  background: rgba(184,213,184,.30);
  border-color: rgba(184,213,184,.60);
  color: var(--text-primary);
}

/* Form elements for generators */
.generator-container input[type="text"],
.generator-container input[type="number"],
.generator-container select,
.generator-container textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: var(--border-soft);
  background: var(--overlay-medium);
  font-weight: var(--font-weight-bold);
  font-family: inherit;
  font-size: .95rem;
  margin-bottom: 12px;
}

.generator-container input:focus,
.generator-container select:focus,
.generator-container textarea:focus {
  outline: none;
  border-color: rgba(94,101,114,.32);
  background: rgba(255,255,255,.96);
  box-shadow: 0 0 0 3px rgba(94,101,114,.10);
}

.generator-container label {
  display: block;
  margin-bottom: 6px;
  font-weight: var(--font-weight-extra-bold);
  color: rgba(24,22,22,.88);
  font-size: .95rem;
}

.generator-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.generator-output {
  border: var(--border-soft);
  border-radius: var(--radius);
  background: var(--overlay-light);
  padding: 18px;
  min-height: 120px;
}

/* Result cards within generators */
.result-card {
  border: var(--border-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,.96);
  padding: 14px;
  margin: 10px 0;
}

.result-card:first-child {
  margin-top: 0;
}

.result-card:last-child {
  margin-bottom: 0;
}

.result-card h3 {
  margin: 0 0 8px;
  font-weight: var(--font-weight-black);
  font-size: 1.05rem;
  color: var(--text-primary);
}

.result-card h4 {
  margin: 10px 0 6px 0;
  font-weight: var(--font-weight-extra-bold);
  font-size: .95rem;
  color: rgba(24,22,22,.88);
}

.result-card p {
  margin: 4px 0;
  color: var(--text-secondary);
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
}

.result-card ul,
.result-card ol {
  margin: 8px 0 8px 20px;
  padding: 0;
  color: var(--text-secondary);
  font-weight: var(--font-weight-bold);
}

.result-card li {
  margin: 4px 0;
  line-height: 1.4;
}

.result-card strong {
  font-weight: var(--font-weight-ultra);
  color: var(--text-primary);
}

.result-card em {
  color: rgba(94,101,114,.85);
  font-style: italic;
}

/* Loading state */
.generator-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  color: rgba(24,22,22,.72);
  font-weight: var(--font-weight-bold);
}

/* Error state */
.generator-error {
  border: 1px solid rgba(207,92,54,.30);
  border-radius: var(--radius);
  background: rgba(207,92,54,.10);
  padding: 14px;
  color: rgba(207,92,54,.92);
  font-weight: var(--font-weight-bold);
  margin: 12px 0;
}

/* =========================
   Generator Sub Headers
   Trait labels and section titles
   ========================= */

.npc-label-text {
  font-size: 0.95rem;
  font-weight: var(--font-weight-black);
  color: rgba(24,22,22,.88);
  letter-spacing: -0.15px;
  line-height: 1.2;
}

.npc-stat-section-title {
  font-size: 1.05rem;
  font-weight: var(--font-weight-ultra);
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.1;
  margin: 0 0 12px 0;
}

/* Responsive adjustments */
@media (max-width: 760px) {
  .generator-container {
    padding: 16px;
  }

  .stat-row {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-value {
    margin-top: 6px;
  }

  .generator-controls {
    flex-direction: column;
  }

  .generator-controls .btn {
    width: 100%;
  }

  .npc-label-text {
    font-size: 0.9rem;
  }

  .npc-stat-section-title {
    font-size: 1rem;
    margin-bottom: 10px;
  }
}
