/* Strategy NFT — dark theme matching Accumora Dashboard */

:root {
  --bg: #0a0e1a;
  --surface: #111827;
  --surface2: #1a2235;
  --border: #1e2d45;
  --accent: #e8630a;
  --accent2: #f97316;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --blue: #3b82f6;
  --purple: #a855f7;
  --text: #e2e8f0;
  --muted: #64748b;
  --glow: rgba(232, 99, 10, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
}

/* ── Header ── */

.header {
  background: linear-gradient(135deg, #0a0e1a 0%, #111827 50%, #0d1520 100%);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.header-logo { font-size: 26px; }

.header-title h1 { font-size: 20px; font-weight: 700; color: var(--accent2); }
.header-title p  { font-size: 11px; color: var(--muted); margin-top: 2px; }

.header-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* ── Connect button ── */

#connectButton {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

#connectButton:hover { opacity: 0.85; }

#connectButton.connected {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 0.3px;
}

#connectButton.connected:hover {
  background: rgba(59, 130, 246, 0.3);
}

#connectionStatus {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

#connectionStatus.status-connected { color: var(--green); }
#connectionStatus.status-warning   { color: var(--yellow); }
#connectionStatus.status-error     { color: var(--red); }

.disconnect-button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.disconnect-button:hover { color: var(--red); }

/* ── Content wrapper ── */

.content {
  padding: 24px 28px;
  max-width: 960px;
  margin: 0 auto;
}

/* ── Card ── */

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 22px;
}

.chart-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}

/* ── Form groups ── */

.form-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.form-group label {
  width: 160px;
  min-width: 140px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

input[type="number"],
input[type="text"],
select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  width: 220px;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--accent2);
}

option {
  background: var(--surface2);
  color: var(--text);
}

/* ── Primary button (Mint NFT) ── */

.primary-button {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  transition: opacity 0.2s;
  letter-spacing: 0.3px;
}

.primary-button:hover  { opacity: 0.85; }
.primary-button:active { opacity: 0.75; }

.primary-button:disabled {
  background: var(--surface2);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Direction toggle ── */

.direction-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dir-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dir-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.dir-btn.active {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

.dir-btn .dir-hint {
  font-size: 10px;
  font-weight: normal;
  opacity: 0.75;
}

/* Accumulate to Sell variant */
button.dir-btn.dir-btn-accum-sell {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.08);
  color: var(--purple);
}

button.dir-btn.dir-btn-accum-sell:hover {
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.15);
}

button.dir-btn.dir-btn-accum-sell.active {
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

/* ── Levels / chips ── */

.levels-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}

.levels-row select {
  flex: 1;
  margin-bottom: 0;
}

.add-btn {
  padding: 8px 14px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.add-btn:hover { opacity: 0.85; }

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  padding-left: 172px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.chip-remove {
  background: none;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 2px;
  font-weight: bold;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.chip-remove:hover { opacity: 1; }

/* ── Token-to price badge ── */

.select-price-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 180px;
}

.select-price-wrapper select {
  width: 160px;
  min-width: 120px;
  flex: 0 0 auto;
  margin-bottom: 0;
}

.token-to-price {
  font-size: 12px;
  color: var(--accent2);
  font-weight: 700;
  white-space: nowrap;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 12px;
  padding: 3px 10px;
  min-width: 90px;
  text-align: center;
}

/* ── NFT list ── */

#nftSection .chart-title {
  margin-bottom: 20px;
}

.nft-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.nft-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 12px;
  width: calc(50% - 10px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.nft-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.nft-item h3 {
  margin-top: 0;
  color: var(--accent2);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nft-item p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
}

.nft-item p strong,
.nft-item p b {
  color: var(--text);
}

.nft-item ul {
  list-style-type: none;
  padding-left: 0;
  margin: 8px 0;
}

.nft-item li {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  margin-bottom: 5px;
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
}

/* ── Trade buttons ── */

.trading-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

button.trade-button {
  flex: 1 1 calc(33% - 8px);
  min-width: 80px;
  padding: 8px 6px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s;
  color: white;
}

button.trade-button:hover:not(:disabled) { opacity: 0.85; }

button.trade-button:disabled {
  background: var(--surface) !important;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
  border: 1px solid var(--border);
}

button.trade-button.enable        { background: var(--green); }
button.trade-button.disable       { background: var(--red); }
button.trade-button.add-usdc      { background: var(--blue); }
button.trade-button.burn          { background: #f97316; }
button.trade-button.deposit-flr   { background: var(--purple); }
button.trade-button.withdraw-flr  { background: #06b6d4; }

/* ── Toast ── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--green);
  color: white;
  padding: 14px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }

/* ── P&L colours ── */

.pnl-value    { font-weight: bold; }
.pnl-positive { color: var(--green); }
.pnl-negative { color: var(--red); }

/* ── Smooth NFT list transition ── */

#nftList { transition: opacity 0.2s ease; }

/* ── Footer ── */

footer {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
  letter-spacing: 0.4px;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .nft-item { width: 100%; }
}

@media (max-width: 640px) {
  .header { padding: 14px 16px; }
  .content { padding: 16px; }

  .form-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-group label { width: auto; min-width: auto; }

  .select-price-wrapper { width: 100%; }
  .select-price-wrapper select { flex: 1; width: 100%; }

  .direction-toggle { flex-direction: column; width: 100%; }
  .dir-btn { width: 100%; justify-content: center; }

  .chips-container { padding-left: 0; }
  .trading-controls { flex-direction: column; }
  button.trade-button { flex: 1 1 100%; }
}
