/* Trade Bottom Sheet — mobile only (≤600px), desktop NIE używa.
   Wars iter / Trade Preview Modal Opcja B per WIZUALIZACJE_UI Wariant A.
   Locked 2026-05-10 (Tomek wybór 3b). */

.tbs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: none;
}
.tbs-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.tbs-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-1, #08090b);
  border-top: 1px solid var(--rule, #1e2329);
  border-radius: 16px 16px 0 0;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 18px 22px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  display: none;
}
.tbs-sheet.visible {
  transform: translateY(0);
}

.tbs-handle {
  width: 36px;
  height: 4px;
  background: var(--ink-faint, #474d57);
  border-radius: 2px;
  margin: 8px auto 14px;
}

.tbs-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink, #eaecef);
  margin-bottom: 4px;
  font-family: var(--font, 'Inter', sans-serif);
}
.tbs-title .ticker {
  color: var(--mint, #00e5a0);
  font-family: var(--mono, 'JetBrains Mono', monospace);
}
.tbs-subtitle {
  font-size: 12px;
  color: var(--ink-mute, #848e9c);
  margin-bottom: 18px;
}

.tbs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
}
.tbs-row .k {
  color: var(--ink-soft, #b7bdc6);
}
.tbs-row .v {
  color: var(--ink, #eaecef);
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-weight: 600;
}
.tbs-row.divider {
  border-top: 1px solid var(--rule, #1e2329);
  padding-top: 14px;
  margin-top: 6px;
}
.tbs-row.total .k {
  font-weight: 700;
  color: var(--ink, #eaecef);
}
.tbs-row.total .v {
  font-size: 18px;
  color: var(--mint, #00e5a0);
}

.tbs-warning {
  margin: 14px 0 8px;
  padding: 10px 12px;
  background: rgba(252, 213, 53, 0.08);
  border: 1px solid rgba(252, 213, 53, 0.4);
  border-radius: 6px;
  color: var(--gold, #fcd535);
  font-size: 12px;
  line-height: 1.5;
}
.tbs-warning.error {
  background: rgba(246, 70, 93, 0.08);
  border-color: rgba(246, 70, 93, 0.4);
  color: var(--down, #f6465d);
}

.tbs-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 18px;
}
.tbs-btn {
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-family: var(--font, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
}
.tbs-btn:active {
  transform: translateY(1px);
}
.tbs-btn.cancel {
  background: var(--bg-3, #181a20);
  color: var(--ink-soft, #b7bdc6);
  border: 1px solid var(--rule, #1e2329);
}
.tbs-btn.confirm {
  background: var(--mint, #00e5a0);
  color: #000;
}
.tbs-btn.confirm.sell {
  background: var(--down, #f6465d);
  color: #fff;
}
.tbs-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile only — desktop NIE używa */
@media (max-width: 600px) {
  .tbs-overlay,
  .tbs-sheet {
    display: block;
  }
}

/* Loading state */
.tbs-loading {
  text-align: center;
  padding: 30px 20px;
  color: var(--ink-mute, #848e9c);
  font-size: 13px;
}

/* Success state */
.tbs-success {
  text-align: center;
  padding: 24px 20px;
}
.tbs-success .icon {
  font-size: 42px;
  margin-bottom: 10px;
}
.tbs-success .msg {
  font-size: 16px;
  color: var(--up, #0ecb81);
  font-weight: 600;
  margin-bottom: 6px;
}
.tbs-success .sub {
  font-size: 13px;
  color: var(--ink-mute, #848e9c);
}
