/* === CraftingPanel === */

.headerActions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Docked warning */
.dockedWarning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 107, 53, 0.08);
  border: 1px solid rgba(255, 107, 53, 0.25);
  border-radius: 4px;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--shell-orange);
}

.dockedWarningIcon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--shell-orange);
}

.sectionIcon {
  display: flex;
  align-items: center;
  color: var(--hull-grey);
}

.divider {
  height: 1px;
  background: var(--dim-grey);
  margin: 0.25rem 0;
}

/* Search + filter bar */
.filterBar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.searchBox {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(10, 14, 20, 0.6);
  border: 1px solid var(--dim-grey);
  border-radius: 3px;
  padding: 0.25rem 0.4rem;
  transition: border-color 0.15s ease;
}

.searchBox:focus-within {
  border-color: var(--plasma-cyan);
}

.searchIcon {
  color: var(--hull-grey);
  flex-shrink: 0;
}

.searchInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--star-white);
  min-width: 0;
}

.searchInput::placeholder {
  color: var(--hull-grey);
  opacity: 0.6;
}

.loadingNotice {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--hull-grey);
  text-align: center;
  padding: 0.25rem;
}

/* Category accordion */
.categoryGroup {
  display: flex;
  flex-direction: column;
}

.categoryHeader {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.5rem;
  background: rgba(61, 90, 108, 0.06);
  border: none;
  border-bottom: 1px solid rgba(61, 90, 108, 0.15);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.categoryHeader:hover {
  background: rgba(61, 90, 108, 0.12);
}

.categoryName {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--chrome-silver);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 1;
}

.categoryCount {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--hull-grey);
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.craftableCount {
  color: var(--bio-green);
}

.recipeDesc {
  font-family: var(--font-space-grotesk), 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  color: var(--chrome-silver);
  line-height: 1.4;
  margin-bottom: 0.15rem;
}

/* Recipe count label */
.recipeCount {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--hull-grey);
  text-align: right;
}

/* Recipe list */
.recipeList {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.recipeItem {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  background: rgba(61, 90, 108, 0.1);
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.recipeItem:hover {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.15);
}

.recipeHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.recipeName {
  font-family: var(--font-space-grotesk), 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--star-white);
}

.recipeCategory {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--hull-grey);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.recipeDetails {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.recipeRow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

.recipeLabel {
  color: var(--hull-grey);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 48px;
}

.recipeValue {
  color: var(--chrome-silver);
}

.recipeInputs {
  color: var(--shell-orange);
}

.recipeOutputs {
  color: var(--bio-green);
}

.recipeSkills {
  color: var(--void-purple);
}

.recipeCraftBtn {
  align-self: flex-end;
  margin-top: 0.15rem;
}

/* Skills section */
.skillList {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skillItem {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.55rem;
  background: rgba(155, 89, 182, 0.06);
  border: 1px solid rgba(155, 89, 182, 0.12);
  border-radius: 4px;
  gap: 0.25rem;
}

.skillInfo {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.skillName {
  font-family: var(--font-space-grotesk), 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  color: var(--star-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skillCategory {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--hull-grey);
  text-transform: uppercase;
}

.skillLevel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  flex-shrink: 0;
}

.skillLevelText {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--plasma-cyan);
}

.skillProgress {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.skillXp {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--hull-grey);
}

/* Category dropdown */
.categorySelect {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(10, 14, 20, 0.6);
  border: 1px solid var(--dim-grey);
  border-radius: 3px;
  padding: 0.2rem 0.35rem;
  flex-shrink: 0;
  transition: border-color 0.15s ease;
}

.categorySelect:focus-within {
  border-color: var(--plasma-cyan);
}

.categorySelectIcon {
  color: var(--hull-grey);
  flex-shrink: 0;
}

.categoryDropdown {
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--star-white);
  cursor: pointer;
  padding: 0;
}

.categoryDropdown option {
  background: #0a0e14;
  color: var(--star-white);
}

/* Filter toggles */
.filterRow {
  display: flex;
  gap: 0;
  border: 1px solid var(--dim-grey);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.filterBtn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.45rem;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hull-grey);
  background: transparent;
  border: none;
  border-right: 1px solid var(--dim-grey);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filterBtn:last-child {
  border-right: none;
}

.filterBtn:hover {
  color: var(--chrome-silver);
  background: rgba(61, 90, 108, 0.1);
}

.filterBtnActive {
  color: var(--plasma-cyan);
  border-color: var(--plasma-cyan);
  background: rgba(0, 212, 255, 0.08);
}

/* Recipe grid */
.recipeGrid {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.2rem 0;
}

.recipeCard {
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.15s ease;
}

.recipeCardCraftable {
  composes: recipeCard;
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.recipeCardCraftable:hover {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.35);
}

.recipeCardLocked {
  composes: recipeCard;
  background: rgba(61, 90, 108, 0.06);
  border: 1px solid rgba(61, 90, 108, 0.15);
  opacity: 0.75;
}

.recipeCardLocked:hover {
  opacity: 1;
  background: rgba(61, 90, 108, 0.1);
}

.recipeCardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: inherit;
}

.recipeCardTitle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  color: var(--hull-grey);
}

.recipeCardBody {
  padding: 0.35rem 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid rgba(61, 90, 108, 0.15);
}

/* Input status colors */
.inputOk {
  color: var(--bio-green);
}

.inputOk::after {
  content: ', ';
}

.inputOk:last-child::after {
  content: '';
}

.inputMissing {
  color: var(--claw-red);
}

.inputMissing::after {
  content: ', ';
}

.inputMissing:last-child::after {
  content: '';
}

/* Skill requirement status */
.skillMet {
  color: var(--bio-green);
}

.skillMet::after {
  content: ', ';
}

.skillMet:last-child::after {
  content: '';
}

.skillUnmet {
  color: var(--claw-red);
}

.skillUnmet::after {
  content: ', ';
}

.skillUnmet:last-child::after {
  content: '';
}

/* Reasons list */
.reasonsList {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.4rem;
  background: rgba(230, 57, 70, 0.06);
  border-radius: 3px;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--claw-red);
}

.reasonItem {
  color: var(--claw-red);
  opacity: 0.85;
}

.reasonItem::after {
  content: ' | ';
  opacity: 0.4;
}

.reasonItem:last-child::after {
  content: '';
}

/* Mobile */
@media (max-width: 768px) {
  .recipeCount { font-size: 0.68rem; }
  .recipeRow { font-size: 0.68rem; }
  .recipeCategory { font-size: 0.68rem; }
  .recipeCraftBtn { min-height: 44px; padding: 0.4rem 0.75rem; }
  .recipeGrid { grid-template-columns: 1fr; }
  .skillCategory { font-size: 0.68rem; }
  .skillXp { font-size: 0.68rem; }
}
