/* Elumia Build Creator — local preview */

body.elumia-build-page:not(.ebld-unlocked) {
  overflow: hidden;
}

body.ebld-unlocked .edb2-gate {
  display: none;
}

.elumia-build-page .hub-subpage-intro a {
  color: var(--hub-accent, #d4af37);
}

.ebld-local-banner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--hub-text-muted, #9a9a9a);
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 8px;
}

.ebld-local-badge {
  padding: 0.15rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: var(--hub-accent, #d4af37);
  border-radius: 4px;
}

.ebld-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 1.25rem 0 1rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 8px;
  width: fit-content;
}

.ebld-tab {
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hub-text-muted, #9a9a9a);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.ebld-tab:hover {
  color: var(--hub-text, #f2f2f2);
}

.ebld-tab.active {
  color: #0a0a0a;
  background: var(--hub-accent, #d4af37);
}

.ebld-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .ebld-create-layout {
    grid-template-columns: 1fr;
  }
}

.ebld-gear-panel,
.ebld-summary-card,
.ebld-save-form {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 10px;
}

.ebld-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ebld-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.ebld-slot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 8px;
}

.ebld-slot-label {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hub-accent, #d4af37);
}

.ebld-toolbar-hint {
  flex: 1 1 200px;
  font-size: 0.8125rem;
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-slot-select {
  width: 100%;
  padding: 0.5rem 0.625rem;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--hub-text, #f2f2f2);
  background: var(--hub-surface, #121212);
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 6px;
}

.ebld-slot-select option,
.ebld-slot-select optgroup {
  background: var(--hub-surface, #121212);
  color: var(--hub-text, #f2f2f2);
}

.ebld-slot-select option,
.ebld-slot-select optgroup {
  background: var(--hub-surface, #121212);
  color: var(--hub-text, #f2f2f2);
}

.ebld-slot-picker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem;
  text-align: left;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ebld-slot-picker:hover,
.ebld-slot-picker:focus-visible {
  outline: none;
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.06);
}

.ebld-slot-picker-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: linear-gradient(145deg, #222, #111);
  overflow: hidden;
}

.ebld-slot-picker-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ebld-slot-picker-icon.is-empty {
  opacity: 0.55;
}

.ebld-slot-picker-body {
  flex: 1;
  min-width: 0;
}

.ebld-slot-picker-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--hub-text, #f2f2f2);
  line-height: 1.35;
}

.ebld-slot-picker.is-empty .ebld-slot-picker-name {
  color: var(--hub-text-muted, #9a9a9a);
  font-weight: 600;
  font-style: italic;
}

.ebld-slot-picker-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-slot-picker-cta {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hub-accent, #d4af37);
}

.ebld-picker-dialog {
  width: min(720px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  padding: 0;
  color: var(--hub-text, #f2f2f2);
  background: var(--hub-surface, #121212);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 12px;
  overflow: hidden;
}

.ebld-picker-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.ebld-picker-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 1.5rem);
}

.ebld-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--hub-border, #2a2a2a);
}

.ebld-picker-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hub-accent, #d4af37);
}

.ebld-picker-title {
  margin: 0;
  font-family: Montserrat, Inter, sans-serif;
  font-size: 1.125rem;
}

.ebld-picker-close {
  width: 2rem;
  height: 2rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--hub-text-muted, #9a9a9a);
  background: transparent;
  border: none;
  cursor: pointer;
}

.ebld-picker-search {
  margin: 0.75rem 1rem 0;
  max-width: none;
  flex: none;
}

.ebld-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 1rem;
  padding: 0.25rem;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.35) transparent;
}

.ebld-picker-grid:focus-visible {
  outline: 1px solid rgba(212, 175, 55, 0.45);
  outline-offset: 2px;
}

.ebld-picker-grid::-webkit-scrollbar {
  width: 8px;
}

.ebld-picker-grid::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 999px;
}

.ebld-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.35rem;
  font: inherit;
  color: inherit;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}

.ebld-picker-item:hover {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.08);
  transform: translateY(-1px);
}

.ebld-picker-item.is-selected {
  border-color: var(--hub-accent, #d4af37);
  background: rgba(212, 175, 55, 0.12);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25);
}

.ebld-picker-item-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: linear-gradient(145deg, #222, #111);
  overflow: hidden;
}

.ebld-picker-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ebld-picker-item-name {
  width: 100%;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hub-text, #f2f2f2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ebld-picker-item-meta {
  width: 100%;
  font-size: 0.5625rem;
  line-height: 1.3;
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--hub-border, #2a2a2a);
}

.ebld-picker-count {
  font-size: 0.75rem;
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-picker-empty {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-picker-icon-fallback {
  font-size: 0.625rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 560px) {
  .ebld-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ebld-slot-picker-cta {
    display: none;
  }
}

.ebld-slot-preview {
  min-height: 3.5rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--hub-text-muted, #9a9a9a);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.ebld-slot-preview.is-empty {
  font-style: italic;
  opacity: 0.65;
}

.ebld-slot-preview .ebld-preview-name {
  display: block;
  font-weight: 700;
  color: var(--hub-text, #f2f2f2);
}

.ebld-slot-preview .ebld-preview-meta {
  font-size: 0.6875rem;
}

.ebld-summary-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1rem;
}

.ebld-summary-title {
  margin: 0 0 0.75rem;
  font-family: Montserrat, Inter, sans-serif;
  font-size: 1rem;
}

.ebld-summary-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.ebld-summary-meta div {
  padding: 0.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.ebld-summary-meta dt {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-summary-meta dd {
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--hub-accent, #d4af37);
}

.ebld-stat-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ebld-stat-totals-empty {
  font-size: 0.8125rem;
  color: var(--hub-text-muted, #9a9a9a);
  font-style: italic;
}

.ebld-stat-total-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.ebld-stat-total-chip strong {
  color: var(--hub-accent, #d4af37);
}

.ebld-save-form {
  margin: 0;
}

.ebld-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.ebld-field span em {
  font-style: normal;
  color: var(--hub-text-muted, #9a9a9a);
  font-weight: 400;
}

.ebld-field input,
.ebld-field textarea {
  padding: 0.5rem 0.625rem;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--hub-text, #f2f2f2);
  background: var(--hub-surface, #121212);
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 6px;
  resize: vertical;
}

.ebld-tags-field {
  margin: 0 0 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 6px;
}

.ebld-tags-field legend {
  padding: 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.ebld-tag-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
}

.ebld-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ebld-save-msg {
  min-height: 1.25rem;
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: #7ecf96;
}

.ebld-community-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ebld-build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.ebld-build-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hub-border, #2a2a2a);
  border-radius: 10px;
  transition: border-color 0.15s;
}

.ebld-build-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
}

.ebld-build-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.ebld-build-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hub-text, #f2f2f2);
}

.ebld-build-source {
  flex-shrink: 0;
  padding: 0.1rem 0.4rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-build-source--mine {
  color: #7ecf96;
  background: rgba(126, 207, 150, 0.12);
}

.ebld-build-source--local {
  color: #9ab6ff;
  background: rgba(154, 182, 255, 0.12);
}

.ebld-build-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-build-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ebld-build-tag {
  padding: 0.15rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
}

.ebld-build-tag--pve {
  color: #7ecf96;
  background: rgba(126, 207, 150, 0.15);
}

.ebld-build-tag--pvp {
  color: #ff9a6b;
  background: rgba(255, 154, 107, 0.15);
}

.ebld-build-tag--hybrid {
  color: #9ab6ff;
  background: rgba(154, 182, 255, 0.15);
}

.ebld-build-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.ebld-build-card-actions .btn {
  flex: 1;
  font-size: 0.75rem;
  padding: 0.45rem 0.625rem;
}

.ebld-detail-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  color: var(--hub-text, #f2f2f2);
  background: var(--hub-surface, #121212);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
}

.ebld-detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.ebld-detail-inner {
  position: relative;
  padding: 1.25rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.ebld-detail-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--hub-text-muted, #9a9a9a);
  background: transparent;
  border: none;
  cursor: pointer;
}

.ebld-detail-title {
  margin: 0 2rem 0.35rem 0;
  font-family: Montserrat, Inter, sans-serif;
  font-size: 1.25rem;
}

.ebld-detail-sub {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--hub-text-muted, #9a9a9a);
}

.ebld-detail-slots {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ebld-detail-slot {
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.ebld-detail-slot strong {
  display: inline-block;
  min-width: 5.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hub-accent, #d4af37);
}

.ebld-detail-notes {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--hub-text-muted, #9a9a9a);
}
