/* Recipes Page Specific Styles */

h1 {
  color: var(--accent-gold);
  margin-bottom: 10px;
}

/* Sortable table headers */
th {
  cursor: pointer;
  user-select: none;
}

th:hover {
  background: #1a4a7a;
}

th.sorted-asc::after {
  content: ' \25B2';
  font-size: 10px;
}

th.sorted-desc::after {
  content: ' \25BC';
  font-size: 10px;
}

/* Clickable rows */
tr.clickable {
  cursor: pointer;
}

/* Checkbox styling */
label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* Recipe Detail Panel */
.recipe-detail {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
  display: none;
}

.recipe-detail.visible {
  display: block;
}

.recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.recipe-title {
  font-size: 1.5em;
  color: var(--accent-gold);
  margin: 0;
}

.recipe-meta {
  color: #9ca3af;
  font-size: 0.9em;
}

.close-btn {
  background: #444;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.close-btn:hover {
  background: #555;
}

/* Cost Breakdown Grid */
.cost-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.cost-card {
  background: #1a1a3e;
  padding: 15px;
  border-radius: 6px;
}

.cost-card h4 {
  margin: 0 0 10px 0;
  color: #9ca3af;
  font-size: 0.85em;
  text-transform: uppercase;
}

.cost-card .value {
  font-size: 1.3em;
}

/* Reagent List */
.reagent-list {
  margin-top: 20px;
}

.reagent-list h3 {
  color: var(--accent-gold);
  margin-bottom: 10px;
}

/* Skill colors */
.skill-range {
  font-size: 0.85em;
  color: #9ca3af;
}

.skill-orange { color: var(--color-orange); }
.skill-yellow { color: var(--color-yellow); }
.skill-green { color: var(--color-green); }
.skill-gray { color: var(--color-gray); }

/* Stats Summary */
.stats-summary {
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: 6px;
}

.stats-summary span {
  margin-right: 20px;
}

/* Badges */
.transmute-badge {
  background: #7c3aed;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75em;
  margin-left: 5px;
}

.bop-badge {
  background: #dc2626;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75em;
  margin-left: 5px;
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.view-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.view-btn:hover {
  background: #2a2a4e;
}

.view-btn.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

/* Ingredients Cell */
.ingredients-cell {
  font-size: 0.85em;
  color: var(--text-secondary);
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Source Badges */
.source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.8em;
  text-transform: capitalize;
}

.source-badge.source-trainer {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.source-badge.source-vendor {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.source-badge.source-drop {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

.source-badge.source-quest {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.source-badge.source-reputation {
  background: rgba(236, 72, 153, 0.2);
  color: #ec4899;
}

.source-badge.source-bop {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 10px;
}

.shopping-btn {
  background: var(--color-blue);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.shopping-btn:hover {
  background: #3d8bd9;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 25px;
  min-width: 350px;
  max-width: 90%;
  border: 1px solid var(--border-color);
}

.modal-content h3 {
  color: var(--text-primary);
  margin: 0 0 20px 0;
}

.modal-content p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.modal-content select,
.modal-content input[type="text"],
.modal-content input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
}

.modal-divider {
  margin: 15px 0;
  text-align: center;
  color: var(--text-muted);
}

.quantity-input {
  margin-top: 15px;
}

.quantity-input label {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.quantity-input input {
  width: 100px;
}

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

.cancel-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
}

.cancel-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.submit-btn {
  background: var(--color-blue);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.submit-btn:hover {
  background: #3d8bd9;
}
