/* Calculator page presentation inspired by tarkov.dev's calculator pages.
   Scoped to .calculator-page so other TarkovRaidCompass pages are untouched. */

.calculator-page .calculator-layout {
  display: block;
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 22px 64px;
}

.calculator-page #calc-nav {
  width: 100%;
  min-width: 0;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  align-self: auto !important;
  overflow: visible !important;
  border: 0;
  background: transparent;
  position: static !important;
  inset: auto !important;
  margin: 0 0 26px;
  padding: 0;
}

.calculator-page #calc-nav .sidebar-scroll {
  display: flex !important;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: auto !important;
  min-height: 44px !important;
  max-height: 44px !important;
  flex: 0 0 44px !important;
  overflow-x: auto;
  overflow-y: hidden !important;
  position: static !important;
  inset: auto !important;
  padding: 0;
  border: 1px solid rgba(190, 166, 103, 0.22);
  background: rgba(13, 14, 12, 0.88);
  scrollbar-width: thin;
}

.calculator-page #calc-nav .category-item {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 150px;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 0;
  background: transparent;
  color: rgba(226, 226, 218, 0.72);
  font: inherit;
  font-size: 13px;
  letter-spacing: .015em;
  text-align: center;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}

.calculator-page #calc-nav .category-item:last-child { border-right: 0; }
.calculator-page #calc-nav .category-item:hover {
  background: rgba(190, 166, 103, 0.08);
  color: #e8e1cc;
}

.calculator-page #calc-nav .category-item.active {
  background: rgba(190, 166, 103, 0.12);
  color: #cbb77d;
  box-shadow: inset 0 -2px 0 #b7a36b;
}

.calculator-page .catalog-main {
  width: 100%;
  min-width: 0;
  padding: 0;
}

.calculator-page .calc-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
}

.calculator-page .calc-title-wrap { min-width: 0; }

.calculator-page .calc-kicker {
  margin: 0 0 5px;
  color: #8d7d54;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.calculator-page .calc-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: #ddd6bd;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  font-weight: 700;
}

.calculator-page .calc-title-icon {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 31px;
  color: #b6a16a;
}

.calculator-page .calc-title-icon svg { width: 100%; height: 100%; }

.calculator-page .calc-subtitle {
  max-width: 760px;
  margin: 10px 0 0;
  color: rgba(225, 225, 215, 0.63);
  line-height: 1.55;
  font-size: 14px;
}

.calculator-page .calc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  max-width: 760px;
}

.calculator-page .calc-control {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
}

.calculator-page .calc-control > span,
.calculator-page .calc-toggle-label {
  color: rgba(225, 225, 215, 0.66);
  font-size: 12px;
}

.calculator-page .calc-input,
.calculator-page .calc-select {
  height: 39px;
  min-width: 0;
  border: 1px solid rgba(183, 163, 107, 0.65);
  border-radius: 0;
  background: rgba(39, 40, 39, 0.92);
  color: #ddd6bd;
  padding: 0 11px;
  font: inherit;
  outline: none;
}

.calculator-page .calc-input:focus,
.calculator-page .calc-select:focus {
  border-color: #c8b476;
  box-shadow: 0 0 0 2px rgba(240, 147, 74, 0.85);
}

.calculator-page .calc-toggle {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  color: rgba(225, 225, 215, 0.74);
  white-space: nowrap;
}

.calculator-page .calc-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #b7a36b;
}

.calculator-page .calc-panel {
  border: 1px solid rgba(255,255,255,.055);
  background: rgba(25, 26, 25, .80);
  box-shadow: 0 14px 36px rgba(0,0,0,.12);
}

.calculator-page .calc-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.calculator-page .calc-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  color: #ddd9c7;
}

.calculator-page .calc-table th {
  padding: 14px 14px;
  background: rgba(13, 14, 13, .94);
  color: rgba(224, 221, 207, .84);
  border-bottom: 2px solid rgba(8, 8, 8, .7);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.calculator-page .calc-table td {
  padding: 13px 14px;
  background: rgba(47, 48, 48, .80);
  border-bottom: 4px solid rgba(18, 18, 17, .92);
  vertical-align: middle;
  font-size: 13px;
}

.calculator-page .calc-table tbody tr:last-child td { border-bottom: 0; }
.calculator-page .calc-table tbody tr:hover td { background: rgba(55, 55, 53, .90); }
.calculator-page .calc-table .positive { color: #aabd85; }
.calculator-page .calc-table .negative { color: #d08c7f; }
.calculator-page .calc-table .muted { color: rgba(225,225,215,.48); }

.calculator-page .calc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.calculator-page .calc-item img,
.calculator-page .calc-mini-item img,
.calculator-page .calc-price-card img {
  object-fit: contain;
  background: rgba(9, 17, 19, .58);
  border: 1px solid rgba(119, 143, 145, .32);
}

.calculator-page .calc-item img { width: 42px; height: 42px; }
.calculator-page .calc-item-name { color: #c9b374; }

.calculator-page .calc-items-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 240px;
}

.calculator-page .calc-mini-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px 4px 4px;
  background: rgba(13, 14, 13, .55);
  border: 1px solid rgba(255,255,255,.05);
  white-space: nowrap;
}

.calculator-page .calc-mini-item img { width: 27px; height: 27px; }
.calculator-page .calc-mini-item strong { color: #d8d1b9; font-weight: 600; }
.calculator-page .calc-mini-item span { color: rgba(225,225,215,.58); }

.calculator-page .calc-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -7px 0 18px;
}

.calculator-page .calc-chip {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(19,20,19,.88);
  color: rgba(225,225,215,.65);
  padding: 0 11px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.calculator-page .calc-chip:hover,
.calculator-page .calc-chip.active {
  color: #d4c38f;
  border-color: rgba(183,163,107,.5);
  background: rgba(183,163,107,.09);
}

.calculator-page .calc-station-grid {
  display: grid;
  gap: 18px;
}

.calculator-page .calc-station-card {
  border-top: 1px solid rgba(183,163,107,.4);
  padding-top: 12px;
}

.calculator-page .calc-station-card h2 {
  margin: 0 0 10px;
  color: #c7b476;
  font-size: 20px;
  font-weight: 600;
}

.calculator-page .calc-price-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin: 20px 0;
}

.calculator-page .calc-price-card {
  display: grid;
  grid-template-columns: 64px auto;
  gap: 10px;
  align-items: center;
  min-width: 250px;
}

.calculator-page .calc-price-card img { width: 64px; height: 64px; }
.calculator-page .calc-price-card-name { color: #b7a36b; font-size: 14px; }
.calculator-page .calc-price-card-value { margin-top: 3px; color: #ddd6bd; font-size: 13px; }

.calculator-page .converter-grid {
  max-width: 650px;
  display: grid;
  gap: 10px;
}

.calculator-page .converter-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 0;
  align-items: stretch;
}

.calculator-page .converter-line input {
  height: 46px;
  border: 1px solid rgba(183,163,107,.5);
  background: rgba(45,46,45,.88);
  color: #ddd6bd;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  outline: none;
}

.calculator-page .converter-code {
  display: grid;
  place-items: center;
  border: 1px solid rgba(183,163,107,.5);
  border-left: 0;
  background: rgba(16,17,16,.95);
  color: #c9b374;
  font-weight: 700;
}

.calculator-page .calc-reset {
  width: fit-content;
  min-height: 36px;
  margin-top: 10px;
  padding: 0 18px;
  border: 1px solid rgba(183,163,107,.45);
  background: rgba(183,163,107,.08);
  color: #d4c38f;
  font: inherit;
  cursor: pointer;
}

.calculator-page .calc-rates {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 1px;
  margin-top: 20px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.05);
}

.calculator-page .calc-rate {
  padding: 12px;
  background: rgba(25,26,25,.94);
}
.calculator-page .calc-rate span { display: block; color: rgba(225,225,215,.48); font-size: 11px; }
.calculator-page .calc-rate strong { display: block; margin-top: 4px; color: #d7ceb0; font-size: 14px; }

.calculator-page .calc-empty {
  padding: 32px;
  text-align: center;
  color: rgba(225,225,215,.5);
}

.calculator-page #calc-note,
.calculator-page #calc-search-field {
  display: none !important;
}

@media (max-width: 900px) {
  .calculator-page .calculator-layout { padding: 20px 14px 50px; }
  .calculator-page .calc-page-head { flex-direction: column; align-items: stretch; }
  .calculator-page .calc-toolbar { justify-content: flex-start; max-width: none; }
  .calculator-page .calc-control { flex: 1 1 180px; }
  .calculator-page .calc-rates { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
}

@media (max-width: 560px) {
  .calculator-page #calc-nav .category-item { padding: 0 13px; }
  .calculator-page .calc-title { font-size: 25px; }
  .calculator-page .calc-toolbar { display: grid; grid-template-columns: 1fr; }
  .calculator-page .calc-control { width: 100%; }
  .calculator-page .calc-price-cards { gap: 16px; }
  .calculator-page .calc-price-card { min-width: 100%; }
  .calculator-page .calc-rates { grid-template-columns: 1fr 1fr; }
}
