/* === OrdersView === */

.container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toolbarActions {
  display: flex;
  gap: 0.3rem;
}

.sectionLabel {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--chrome-silver);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


.loading {
  font-family: var(--font-space-grotesk), 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  color: var(--hull-grey);
  text-align: center;
  padding: 1rem 0.5rem;
}


/* New order form */
.formContainer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem;
  background: rgba(61, 90, 108, 0.06);
  border: 1px solid rgba(61, 90, 108, 0.2);
  border-radius: 4px;
}

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

.typeToggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--hull-grey);
  border-radius: 4px;
  overflow: hidden;
}

.typeBtn {
  flex: 1;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  border: none;
  color: var(--hull-grey);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  transition: all 0.15s ease;
}

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

.typeBtnActiveSell {
  background: rgba(255, 107, 53, 0.15);
  color: var(--shell-orange);
}

.typeBtnActiveBuy {
  background: rgba(0, 212, 255, 0.12);
  color: var(--plasma-cyan);
}

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

.formLabel {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--hull-grey);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.formHint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--hull-grey);
}

.formRow {
  display: flex;
  gap: 0.4rem;
}

.formInput {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--star-white);
  background: rgba(10, 14, 20, 0.6);
  border: 1px solid var(--dim-grey);
  border-radius: 3px;
  padding: 0.4rem 0.5rem;
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease;
}

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

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

.formActions {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-end;
}

/* ── Sell Dropdown ────────────────────────────────────────────────── */

.dropdown {
  position: relative;
}

.dropdownTrigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--star-white);
  background: rgba(10, 14, 20, 0.6);
  border: 1px solid var(--dim-grey);
  border-radius: 3px;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.dropdownTrigger:hover, .dropdownTrigger:focus {
  border-color: var(--plasma-cyan);
}

.dropdownValue {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdownPanel {
  position: absolute;
  z-index: 100;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: rgba(10, 15, 28, 0.97);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  max-height: 240px;
  display: flex;
  flex-direction: column;
}

.dropdownSearch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  color: var(--hull-grey);
}

.dropdownSearchInput {
  flex: 1;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--star-white);
  background: transparent;
  border: none;
  outline: none;
}

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

.dropdownList {
  overflow-y: auto;
  max-height: 200px;
}

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

.dropdownItem {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--chrome-silver);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
}

.dropdownItem:hover {
  background: rgba(0, 212, 255, 0.08);
  color: var(--star-white);
}

.dropdownItemActive {
  background: rgba(0, 212, 255, 0.12);
  color: var(--plasma-cyan);
}

.dropdownItemName {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdownItemQty {
  flex-shrink: 0;
  font-size: 0.6rem;
  color: var(--hull-grey);
}

.dropdownItemCategory {
  flex-shrink: 0;
  font-size: 0.55rem;
  color: var(--hull-grey);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dropdownItemPrice {
  flex-shrink: 0;
  font-size: 0.6rem;
  color: var(--hull-grey);
}

/* ── Buy Autocomplete ─────────────────────────────────────────────── */

.autocomplete {
  position: relative;
}

.autocompleteInputWrap {
  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.35rem 0.5rem;
  transition: border-color 0.15s ease;
  color: var(--hull-grey);
}

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

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

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

.autocompleteClear {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--hull-grey);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

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

.autocompletePanel {
  position: absolute;
  z-index: 100;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: rgba(10, 15, 28, 0.97);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  max-height: 240px;
  overflow-y: auto;
}


/* Order list */
.orderList {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.orderCard {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.45rem 0.55rem;
  background: rgba(61, 90, 108, 0.08);
  border: 1px solid rgba(61, 90, 108, 0.18);
  border-radius: 4px;
  transition: border-color 0.15s ease;
}

.orderCard:hover {
  border-color: rgba(61, 90, 108, 0.35);
}

.factionCard {
  border-left: 2px solid var(--void-purple);
}

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

.orderTypeBadge {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.52rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
  letter-spacing: 0.06em;
}

.badgeSell {
  color: var(--shell-orange);
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

.badgeBuy {
  color: var(--plasma-cyan);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
}

.orderItemName {
  flex: 1;
  font-family: var(--font-space-grotesk), 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--star-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.createdBy {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--hull-grey);
  flex-shrink: 0;
}


.orderDetails {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.orderDetail {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--chrome-silver);
}

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

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


.modifyInline {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.modifyLabel {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--chrome-silver);
}

.modifyInput {
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid var(--plasma-cyan);
  border-radius: 3px;
  padding: 0.2rem 0.35rem;
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--star-white);
  outline: none;
  width: 5rem;
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.12);
}


.modifyResult {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.3rem;
  background: rgba(10, 14, 23, 0.3);
  border-radius: 3px;
}

.modifyMessage {
  font-family: var(--font-space-grotesk), 'Space Grotesk', sans-serif;
  font-size: 0.62rem;
  color: var(--chrome-silver);
}

.modifyFeeWarning {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--warning-yellow);
}

.modifyFeeNote {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--warning-yellow);
  margin-left: 0.25rem;
  white-space: nowrap;
}

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

/* Mobile */
@media (max-width: 768px) {
  .typeBtn { min-height: 44px; padding: 0.4rem 0.5rem; }
  .modifyInput { font-size: 16px; min-height: 44px; }
  .orderTypeBadge { font-size: 0.68rem; }
  .orderMeta { font-size: 0.68rem; }
  .createdBy { font-size: 0.68rem; }
  .modifyFeeWarning { font-size: 0.68rem; }
}
