/* /crafting/styles2.css
 * FO2 Crafting layout + queue UI (cleaned + de-duped)
 * - Keeps your Items-page glass/pixel vibe
 * - Removes dead selectors + merges duplicates
 * - Fixes queue progress bar (JS sets .crafting-queue-item-progress height)
 */

/* -------------------------------------------------------------------------- */
/* Theme + base                                                                */
/* -------------------------------------------------------------------------- */

:root{
  --bg-x: 0px;
  --bg-y: 0px;
  --zoom: 1;

  --panel: rgba(10, 12, 16, 0.78);
  --panel2: rgba(10, 12, 16, 0.88);
  --line: rgba(255,255,255,0.12);
  --line2: rgba(255,255,255,0.18);

  --txt: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.66);
  --hover: rgba(255,255,255,0.06);

  /* background dark overlay */
  --bg-overlay: rgba(0,0,0,0.58);

  /* Scrollbars (general) */
  --scrollbar-size: 12px;
  --scroll-track: rgba(0,0,0,0.40);
  --scroll-track-border: rgba(255,255,255,0.10);
  --scroll-thumb: rgba(255,255,255,0.16);
  --scroll-thumb-border: rgba(255,255,255,0.14);
  --scroll-thumb-hover: rgba(255,255,255,0.24);
  --scroll-thumb-hover-border: rgba(255,255,255,0.20);
  --scroll-thumb-active: rgba(34,197,94,0.28);
  --scroll-thumb-active-border: rgba(34,197,94,0.38);

  /* Crafting tokens (aliases so the rest of your CSS stays consistent) */
  --crafting-text-main: var(--txt);
  --crafting-text-muted: var(--muted);

  --crafting-accent: rgba(56, 189, 248, 0.95); /* cyan */
  --crafting-accent2: rgba(37, 99, 235, 0.95); /* blue */
  --crafting-success: rgba(34, 197, 94, 0.95);
  --crafting-danger: rgba(248, 113, 113, 0.95);

  --crafting-radius-lg: 14px;
  --crafting-radius-pill: 4px;

  --crafting-border-subtle: rgba(148, 163, 184, 0.55);
  --crafting-border-strong: rgba(51, 65, 85, 0.95);

  --crafting-shadow-soft: 0 18px 50px rgba(0,0,0,0.35);
  --crafting-shadow-tooltip: 0 18px 50px rgba(0,0,0,0.55);
}

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

.mf-nav-logo {
    image-rendering: auto;
}

html,body{
  height: 100%;
  margin: 0;
  background: #05070a;
  
}

body{
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--txt);
  background: transparent;
  position: relative;
      image-rendering: pixelated;

}

/* -------------------------------------------------------------------------- */
/* Background                                                                  */
/* -------------------------------------------------------------------------- */

/* Fixed background layer (doesn't scroll) */
.bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image: url("https://myfo2.com/zones/noob-island.png");
  background-repeat: no-repeat;
  background-color: #05070a;

  /* keep image at "true size" relative to initial zoom by compensating with --zoom */
  background-size: calc(4096px / var(--zoom)) calc(3072px / var(--zoom));
  background-position: var(--bg-x) var(--bg-y);

  image-rendering: pixelated;
}

.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background: var(--bg-overlay);
  pointer-events:none;
}

/* -------------------------------------------------------------------------- */
/* Page shell                                                                   */
/* -------------------------------------------------------------------------- */

.wrap{
  margin: 0 auto;
  padding: 14px;
  position: relative;
  z-index: 1; /* above background */
}

.app-frame{
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

.app-inner{
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-main{
  min-height: 0;
  display: block;
}

.crafting-app{
  margin: 24px 0 40px;
  padding: 0 16px;
}

/* -------------------------------------------------------------------------- */
/* Header                                                                       */
/* -------------------------------------------------------------------------- */

.crafting-header{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;

  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
}

.crafting-header-main{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.crafting-title{
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.02em;
}

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

.crafting-header-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.crafting-search-input{
  min-width: 220px;
  border-radius: var(--crafting-radius-pill);
  border: 1px solid var(--crafting-border-subtle);
  background: rgba(15, 23, 42, 0.85);
  color: var(--crafting-text-main);
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
  box-shadow: 0 0 0 1px transparent;
}

.crafting-search-input::placeholder{
  color: rgba(148, 163, 184, 0.70);
}

.crafting-search-input:focus{
  border-color: var(--crafting-accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.70);
}

/* -------------------------------------------------------------------------- */
/* Main layout                                                                  */
/* -------------------------------------------------------------------------- */

.crafting-layout{
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 14px;
}

/* -------------------------------------------------------------------------- */
/* Shared panel look                                                           */
/* -------------------------------------------------------------------------- */

.crafting-queue-panel,
.crafting-recipes-panel{
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: var(--crafting-radius-lg);
  box-shadow: var(--crafting-shadow-soft);
  min-height: 0;
}

/* -------------------------------------------------------------------------- */
/* Queue panel                                                                  */
/* -------------------------------------------------------------------------- */

.crafting-queue-panel{
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

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

.crafting-queue-title-wrap{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.crafting-queue-header h2{
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #cbd5f5;
}

.crafting-queue-count-text{
  margin: 0;
  font-size: 12px;
  color: var(--crafting-text-muted);
}

.crafting-queue-actions{
  display: flex;
  align-items: center;
  gap: 6px;
}

.crafting-queue-btn{
  border-radius: var(--crafting-radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.70);
  background: rgba(15, 23, 42, 0.90);
  color: var(--crafting-text-main);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease;
}

.crafting-queue-btn--ghost{
  background: transparent;
  border-style: dashed;
  color: var(--crafting-text-muted);
}

.crafting-queue-btn:hover{
  background: rgba(30, 64, 175, 0.85);
  border-color: var(--crafting-accent);
  color: #e5f3ff;
  transform: translateY(-0.5px);
}

.crafting-queue-btn:active{
  transform: translateY(0.5px);
}

/* Queue list + scrollbar */
.crafting-queue-list{
  max-height: 280px;
  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.60) rgba(15, 23, 42, 0.96);
}

.crafting-queue-list::-webkit-scrollbar{
  width: 8px;
}

.crafting-queue-list::-webkit-scrollbar-track{
  background: rgba(15, 23, 42, 0.96);
  border-radius: 999px;
}

.crafting-queue-list::-webkit-scrollbar-thumb{
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.90),
    rgba(37, 99, 235, 0.90)
  );
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 1);
}

.crafting-queue-list::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(
    180deg,
    rgba(96, 200, 255, 1),
    rgba(59, 130, 246, 1)
  );
}

.crafting-queue-list-empty{
  padding: 6px 4px;
  font-size: 12px;
  color: var(--crafting-text-muted);
  text-align: center;
}

/* Queue item (with progress bar driven by JS on .crafting-queue-item-progress) */
.crafting-queue-item{
  position: relative;
  border-radius: 4px;
  border: 1px solid rgba(51, 65, 85, 0.95);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #020617);
  padding: 8px 8px 6px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}

.crafting-queue-item:last-child{
  margin-bottom: 0;
}

/* The actual progress fill (height is set inline by JS) */
.crafting-queue-item-progress{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  opacity: 0.95;
  pointer-events: none;
  transition: height 400ms linear;
}

/* Use display:contents so your grid layout stays intact */
.crafting-queue-item-inner{
  position: relative;
  z-index: 1;
  display: contents;
  overflow: visible;
}

.crafting-queue-item-icon-wrap{
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crafting-queue-item-icon{
  width: 32px;
  height: 32px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  image-rendering: pixelated;
}

.crafting-queue-item-content{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.crafting-queue-item-title{
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crafting-queue-item-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  color: var(--crafting-text-muted);
  min-width: 0;
}

/* Rating buttons (1–4) */
.crafting-queue-rating{
  display: inline-flex;
  gap: 4px;
  margin-top: 2px;
}

.crafting-queue-rating-btn{
  min-width: 26px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(51, 65, 85, 0.90);
  background: rgba(15, 23, 42, 0.96);
  color: var(--crafting-text-muted);
  font-size: 11px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease;
}

.crafting-queue-rating-btn:hover{
  border-color: rgba(74, 222, 128, 0.90);
  color: #bbf7d0;
  transform: translateY(-0.5px);
}

.crafting-queue-rating-btn:active{
  transform: translateY(0.5px);
}

.crafting-queue-rating-btn--active{
  background: radial-gradient(circle at top, rgba(34, 197, 94, 0.85), rgba(21, 128, 61, 1));
  color: #ecfdf5;
}

.crafting-queue-item-right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  overflow: visible;
}

.crafting-queue-item-time{
  font-size: 12px;
}

/* Icon actions (restart / clear) */
.crafting-queue-item-actions{
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 2px;
}

.crafting-icon-btn{
  position: relative;
  width: 26px;
  min-width: 26px;
  height: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 6px;
  border: 1px solid rgba(51, 65, 85, 0.90);
  background: rgba(15, 23, 42, 0.96);
  color: var(--crafting-text-muted);

  padding: 0;
  cursor: pointer;

  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.crafting-icon-btn i{
  font-size: 11px;
  line-height: 1;
}

.crafting-icon-btn:hover{
  background: rgba(30, 64, 175, 0.85);
  border-color: var(--crafting-accent);
  color: #e5f3ff;
  transform: translateY(-0.5px);
}

.crafting-icon-btn:active{
  transform: translateY(0.5px);
}

.crafting-icon-btn:focus-visible{
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

/* Tooltip bubble on icon buttons */
.crafting-icon-btn::after{
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);

  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(10, 12, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;

  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  z-index: 9999;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.45));
  transition: opacity 120ms ease, transform 120ms ease;
}

/* Tooltip arrow */
.crafting-icon-btn::before{
  content: "";
  position: absolute;
  right: 10px;
  bottom: calc(100% + 4px);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(10, 12, 18, 0.95);

  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 120ms ease, transform 120ms ease;
}

.crafting-icon-btn:hover::after,
.crafting-icon-btn:focus-visible::after,
.crafting-icon-btn:hover::before,
.crafting-icon-btn:focus-visible::before{
  opacity: 1;
  transform: translateY(0);
}

.crafting-queue-item--done{
  border-color: rgba(34, 197, 94, 0.85);
  opacity:0.6;
}

.crafting-queue-item--done:hover{
opacity:1;
}

.crafting-queue-item--done .crafting-queue-item-progress{
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.35), transparent);
}

.crafting-queue-hint{
  margin: 8px 2px 0;
  font-size: 11px;
  color: var(--crafting-text-muted);
}

/* Global banner */
.crafting-global-banner{
  margin-top: 10px;
}

.crafting-global-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--crafting-radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.80);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.26), transparent 55%),
    rgba(15, 23, 42, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
  font-size: 12px;
  color: var(--crafting-text-main);
  width: calc(100% - 26px);
}

.crafting-global-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow:
    0 0 0 2px rgba(34, 197, 94, 0.4),
    0 0 12px rgba(34, 197, 94, 0.9);
}

.crafting-global-text strong{
  font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* Recipes panel                                                               */
/* -------------------------------------------------------------------------- */

.crafting-recipes-panel{
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
}

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

.crafting-recipes-header h2{
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #cbd5f5;
}

.crafting-recipes-count{
  font-size: 11px;
  color: var(--crafting-text-muted);
}

/* Filters row (Tier / Type / Subtype / Stat) */
/* Filters row (Tier / Type / Subtype / Stat / Search) */
.crafting-filters-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
  align-items: flex-end; /* helps line things up nicely */
}

/* ✅ Right-aligned search "column" */
.crafting-filter--search{
  margin-left: auto;          /* pushes it to the right on the same row */
  flex: 1 1 260px;            /* can shrink/grow */
  max-width: 360px;           /* keeps it from getting comically wide */
}

.crafting-filter--search .crafting-search-input{
  width: 100%;
}

/* Optional: make search input height feel closer to selects */
.crafting-search-input{
  font-size: 12px;
  padding: 5px 12px;
}


.crafting-filter{
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--crafting-text-muted);
}

.crafting-filter-label{
  opacity: 0.85;
}

.crafting-filter-select{
  min-width: 120px;
  border-radius: var(--crafting-radius-pill);
  border: 1px solid var(--crafting-border-subtle);
  background: rgba(15, 23, 42, 0.90);
  color: var(--crafting-text-main);
  font-size: 12px;
  padding: 4px 10px;
  outline: none;
}

.crafting-filter-select:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

.crafting-filter-select:focus{
  border-color: var(--crafting-accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.70);
}

/* Grid mode (no tier selected) */
.crafting-recipes-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
}

.crafting-recipe-tile{
  position: relative;
  width: 100%;
  padding-top: 100%; /* square */
  border-radius: 2px;
  border: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  transition: transform 80ms ease, box-shadow 80ms ease, border-color 80ms ease, background 120ms ease;
}

.crafting-recipe-tile-inner{
  position: absolute;
  inset: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crafting-recipe-icon{
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background-color: rgba(15, 23, 42, 0.90);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  image-rendering: pixelated;
}

.crafting-recipe-tile:hover{
  transform: translateY(-1px);
  border-color: var(--crafting-accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.90), 0 0 18px rgba(37, 99, 235, 0.80);
}

.crafting-recipe-tile:active{
  transform: translateY(0);
}

/* Tier badge on tiles */
.crafting-recipe-tile--tiered{
  border-color: rgba(56, 189, 248, 0.90);
}

.crafting-recipe-tier-badge{
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e0f2fe;
  pointer-events: none;
  text-shadow:
    0 0 3px rgba(15, 23, 42, 0.95),
    0 0 6px rgba(15, 23, 42, 0.90);
}

/* List mode (tier selected) */
.crafting-recipes-grid--list{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crafting-recipe-line-wrapper{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crafting-recipe-line{
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(30, 64, 175, 0.85);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.20), transparent 60%),
    rgba(15, 23, 42, 0.96);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, border-color 80ms ease, background 120ms ease;
}

.crafting-recipe-line:hover{
  transform: translateY(-1px);
  border-color: var(--crafting-accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.90), 0 0 14px rgba(37, 99, 235, 0.70);
}

.crafting-recipe-line-ingredients{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.crafting-recipe-line-op{
  margin: 0 4px;
  font-size: 12px;
  color: var(--crafting-text-muted);
}

.crafting-recipe-line-item{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.crafting-recipe-line-name{
  font-size: 13px;
  color: var(--crafting-text-main);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crafting-recipe-line-icon{
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: rgba(15, 23, 42, 0.90);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  image-rendering: pixelated;
  border: 1px solid rgba(30, 64, 175, 0.90);
}

.crafting-recipe-line-qty{
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 0 4px;
  font-size: 10px;
  border-radius: var(--crafting-radius-pill);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.90);
  color: var(--crafting-text-main);
}

.crafting-recipe-line-meta{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 11px;
  color: var(--crafting-text-muted);
}

.crafting-recipe-line-tier{
  padding: 2px 7px;
  border-radius: var(--crafting-radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.90);
  background: rgba(15, 23, 42, 0.95);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e0f2fe;
}

.crafting-recipe-line-meta-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 10px;
}

/* Ingredients (icons on the left) */
.crafting-recipe-line-ing-item{
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
}

.crafting-recipe-line-ing-icon{
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(30, 64, 175, 0.90);
  background-color: rgba(15, 23, 42, 0.95);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.crafting-recipe-line-ing-qty{
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 0 4px;
  font-size: 9px;
  border-radius: var(--crafting-radius-pill);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.90);
  color: #e2e8f0;
}

/* Steps region */
.crafting-recipe-steps{
  border-radius: 10px;
  border: 1px dashed rgba(56, 189, 248, 0.60);
  background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  padding: 6px 8px;
}

.crafting-recipe-steps-list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crafting-recipe-step{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(30, 64, 175, 0.85);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
}

.crafting-recipe-step-top{
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.crafting-recipe-step-index{
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: var(--crafting-radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.90);
  color: rgba(226, 232, 240, 0.90);
  background: rgba(15, 23, 42, 0.95);
  flex-shrink: 0;
}

.crafting-recipe-step-chain{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.crafting-recipe-step-chain-item,
.crafting-recipe-step-result{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.crafting-recipe-step-icon{
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(30, 64, 175, 0.90);
  background-color: rgba(15, 23, 42, 0.95);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.crafting-recipe-step-qty{
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 0 4px;
  font-size: 9px;
  border-radius: var(--crafting-radius-pill);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.90);
  color: #e2e8f0;
}

.crafting-recipe-step-op{
  font-size: 12px;
  color: var(--crafting-text-muted);
}

.crafting-recipe-step-name{
  font-size: 12px;
  color: #e2e8f0;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crafting-recipe-step-meta-row{
  font-size: 10px;
  color: rgba(148, 163, 184, 0.90);
}

.crafting-recipe-step-base{
  font-size: 11px;
  color: rgba(148, 163, 184, 0.90);
}

/* Steps toggle button */
.crafting-recipe-steps-toggle{
  border-radius: var(--crafting-radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.80);
  background: rgba(15, 23, 42, 0.96);
  color: #e0f2fe;
  font-size: 10px;
  padding: 3px 9px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease;
}

.crafting-recipe-steps-toggle:hover{
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.85), rgba(37, 99, 235, 1));
  border-color: rgba(191, 219, 254, 1);
  transform: translateY(-0.5px);
}

.crafting-recipe-steps-toggle:active{
  transform: translateY(0.5px);
}

/* -------------------------------------------------------------------------- */
/* Tooltip + context menu                                                      */
/* -------------------------------------------------------------------------- */

.crafting-tooltip{
  position: absolute;
  z-index: 9999;
  max-width: 280px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.95);
  box-shadow: var(--crafting-shadow-tooltip);
  padding: 8px 10px;
  font-size: 12px;
  color: var(--crafting-text-main);
  pointer-events: none;
}

.crafting-tooltip-title{
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.crafting-tooltip-meta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11px;
  color: var(--crafting-text-muted);
  margin-bottom: 6px;
}

.crafting-tooltip-meta-pill{
  padding: 2px 7px;
  border-radius: var(--crafting-radius-pill);
  border: 1px solid rgba(30, 64, 175, 0.90);
  background: rgba(15, 23, 42, 0.90);
}

.crafting-tooltip-meta-icon{
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: -2px;
}

.crafting-tooltip-meta-icon--gold{
  background-image: url('https://art.fantasyonline2.com/textures/gui/coins-icon.png');
}

.crafting-tooltip-ingredients{
  border-top: 1px solid rgba(30, 64, 175, 0.90);
  padding-top: 6px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crafting-tooltip-ingredients-title{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.90);
  margin-bottom: 2px;
}

.crafting-tooltip-ingredient-row{
  display: flex;
  align-items: center;
  gap: 6px;
}

.crafting-tooltip-ingredient-icon{
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(30, 64, 175, 0.90);
  background-color: rgba(15, 23, 42, 0.90);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.crafting-tooltip-ingredient-text{
  font-size: 11px;
  color: var(--crafting-text-main);
}

.crafting-tooltip-crafters{
  border-top: 1px solid rgba(30, 64, 175, 0.90);
  margin-top: 6px;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crafting-tooltip-crafters-title{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.90);
}

.crafting-tooltip-crafter-row{
  display: flex;
  flex-direction: column;
  font-size: 11px;
}

.crafting-tooltip-crafter-name{
  font-weight: 500;
  color: var(--crafting-text-main);
}

.crafting-tooltip-crafter-zones{
  color: var(--crafting-text-muted);
}

/* Context menu */
.crafting-context-menu{
  position: absolute;
  z-index: 10000;
  min-width: 170px;
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.95);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), #020617);
  box-shadow: var(--crafting-shadow-tooltip);
  padding: 4px;
  display: none;
}

.crafting-context-menu-item{
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--crafting-text-main);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.crafting-context-menu-item:hover{
  background: rgba(30, 64, 175, 0.90);
  color: #e0f2fe;
}

.crafting-context-menu-item--disabled,
.crafting-context-menu-item:disabled{
  opacity: 0.45;
  cursor: default;
}

.crafting-context-menu-item--disabled:hover,
.crafting-context-menu-item:disabled:hover{
  background: transparent;
  color: var(--crafting-text-main);
}

/* -------------------------------------------------------------------------- */
/* Toast                                                                        */
/* -------------------------------------------------------------------------- */

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;

  padding: 10px 14px;
  border-radius: var(--crafting-radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.92);
  color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);

  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 99999;
  font-size: 12px;
}

.toast--show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                   */
/* -------------------------------------------------------------------------- */

@media (max-width: 920px){
  .crafting-layout{
    grid-template-columns: minmax(0, 1fr);
  }

  .crafting-queue-panel{
    order: -1;
  }
}

@media (max-width: 640px){
  .crafting-header{
    align-items: flex-start;
  }

  .crafting-header-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .crafting-search-input{
    width: 100%;
    min-width: 0;
  }

  .crafting-filters-row{
    flex-direction: column;
    align-items: flex-start;
  }
  
   .crafting-filter--search{
    margin-left: 0;
    width: 100%;
    max-width: none;
  }
}
