/* ═══════════════════════════════════════════════════════════════════
   Resource Chains Guide — Styles
   ═══════════════════════════════════════════════════════════════════ */

/* ── Header Button ─────────────────────────────────────────────── */

.btn-resource-chains-header {
  position: relative;
  background: linear-gradient(135deg, #6b4226, #8b6340);
  color: #f5deb3;
  border: 1px solid #c6a84b;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn-resource-chains-header:hover {
  background: linear-gradient(135deg, #8b6340, #a67c52);
  box-shadow: 0 0 8px rgba(198, 168, 75, 0.4);
}

/* ── Overlay / Modal ───────────────────────────────────────────── */

.rc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rc-modal {
  background: linear-gradient(180deg, #1a120b 0%, #2b1810 40%, #1a120b 100%);
  border: 2px solid #c6a84b;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  color: #f5deb3;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(198, 168, 75, 0.15);
}

/* ── Header ────────────────────────────────────────────────────── */

.rc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 12px;
  border-bottom: 1px solid rgba(198, 168, 75, 0.2);
}

.rc-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #c6a84b;
}

.rc-close-btn {
  background: none;
  border: none;
  color: #f5deb3;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.rc-close-btn:hover {
  opacity: 1;
}

/* ── Body ──────────────────────────────────────────────────────── */

.rc-body {
  padding: 16px 24px 24px;
}

/* ── Catalyst Banner ───────────────────────────────────────────── */

.rc-catalyst-banner {
  background: linear-gradient(135deg, rgba(198, 168, 75, 0.12), rgba(198, 168, 75, 0.05));
  border: 1px solid rgba(198, 168, 75, 0.35);
  border-radius: 8px;
  padding: 14px 18px;
}

.rc-catalyst-banner h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #c6a84b;
}

.rc-catalyst-subtitle {
  font-weight: normal;
  font-size: 0.85rem;
  color: #a89060;
}

.rc-catalyst-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.rc-catalyst-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  font-size: 0.85rem;
}

.rc-catalyst-icon {
  font-size: 1.1rem;
}

.rc-catalyst-name {
  color: #f5deb3;
  font-weight: 600;
}

.rc-arrow-small {
  color: #c6a84b;
  font-weight: bold;
}

.rc-catalyst-resource {
  color: #c6a84b;
  font-weight: 600;
}

.rc-catalyst-outpost-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(198, 168, 75, 0.2);
}

.rc-catalyst-grid-small {
  margin-top: 6px;
}

.rc-catalyst-card-small {
  font-size: 0.8rem;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.15);
}

/* ── Flow Arrows ───────────────────────────────────────────────── */

.rc-flow-arrow {
  text-align: center;
  color: rgba(198, 168, 75, 0.5);
  font-size: 1rem;
  padding: 6px 0;
  letter-spacing: 6px;
}

/* ── Tier Rows ─────────────────────────────────────────────────── */

.rc-tier-row {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(198, 168, 75, 0.15);
  border-radius: 8px;
  padding: 14px 16px;
}

.rc-tier-label {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #c6a84b;
  border-bottom: 1px solid rgba(198, 168, 75, 0.15);
  padding-bottom: 6px;
}

.rc-tier-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Building Cards ────────────────────────────────────────────── */

.rc-card {
  background: rgba(43, 24, 16, 0.8);
  border: 1px solid rgba(198, 168, 75, 0.2);
  border-radius: 6px;
  padding: 10px 14px;
  min-width: 160px;
  flex: 1 1 auto;
  max-width: 260px;
}

.rc-card-basic {
  border-color: rgba(139, 99, 64, 0.4);
}

.rc-card-building {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #f5deb3;
}

.rc-card-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.8rem;
}

.rc-card-inputs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  color: #cba878;
}

.rc-card-arrow {
  color: #c6a84b;
  font-weight: bold;
  font-size: 0.95rem;
  margin: 0 2px;
}

.rc-card-output {
  color: #8fc98f;
  font-weight: 600;
}

.rc-resource {
  white-space: nowrap;
}

/* ── Catalyst Input Highlight ──────────────────────────────────── */

.rc-catalyst-input {
  color: #c6a84b;
  font-weight: 600;
  border-bottom: 1px dashed rgba(198, 168, 75, 0.5);
}

/* ── Mobile ────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .rc-overlay {
    padding: 10px;
  }

  .rc-modal {
    max-height: 90vh;
  }

  .rc-body {
    padding: 12px 14px 18px;
  }

  .rc-tier-cards {
    flex-direction: column;
  }

  .rc-card {
    max-width: none;
  }

  .rc-catalyst-grid {
    grid-template-columns: 1fr;
  }

  .rc-header {
    padding: 14px 16px 10px;
  }

  .rc-header h2 {
    font-size: 1.15rem;
  }

  .btn-resource-chains-header .rc-btn-label {
    display: none;
  }
}
