/* BLT Wallet - Custom Styles */

:root {
  --pico-font-size: 16px;
  --spacing: 1rem;
}

/* Header */
header.container {
  padding-top: var(--spacing);
  padding-bottom: var(--spacing);
}

.network-badge {
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* Wallet Card */
.wallet-card {
  text-align: center;
  padding: 2rem;
}

.loading-card {
  text-align: center;
  padding: 4rem 2rem;
}

/* QR Code */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

#qrcode {
  padding: 1rem;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  display: inline-block;
}

#qrcode img,
#qrcode canvas {
  display: block;
}

.qr-container .warning {
  color: var(--pico-del-color);
  margin-top: 0.5rem;
  font-weight: bold;
}

/* Address Display */
.address-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--pico-muted-border-color);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 1.5rem;
  max-width: 100%;
  overflow: hidden;
}

.address-display code {
  font-size: 0.85rem;
  word-break: break-all;
  background: none;
  padding: 0;
}

.address-display:hover {
  background: var(--pico-secondary-hover-background);
}

.copy-icon {
  flex-shrink: 0;
}

/* Balance */
.balance {
  margin-bottom: 1.5rem;
}

.balance h2 {
  margin-bottom: 0.25rem;
  font-size: 2.5rem;
}

.balance .fiat {
  color: var(--pico-muted-color);
  margin: 0;
}

/* Actions */
.actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.actions button {
  margin: 0;
}

/* Private Key Display */
.private-key-display {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--pico-del-color);
  border-radius: 8px;
  color: white;
}

.private-key-display .warning-text {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.private-key-display .wif {
  display: block;
  word-break: break-all;
  font-size: 0.8rem;
  background: rgba(0,0,0,0.2);
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  color: white;
}

.private-key-display button {
  --pico-background-color: white;
  --pico-color: var(--pico-del-color);
}

/* Transactions */
.transactions-card {
  margin-top: 1rem;
}

.transactions-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0;
}

.transactions-card header h3 {
  margin: 0;
}

.transactions-card header button {
  margin: 0;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.transactions-card table {
  margin-bottom: 0;
}

.transactions-card td {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
}

.transactions-card .received {
  color: var(--pico-ins-color);
}

.transactions-card .sent {
  color: var(--pico-del-color);
}

.transactions-card .time {
  color: var(--pico-muted-color);
  font-size: 0.85rem;
}

.transactions-card .txid {
  font-family: monospace;
  font-size: 0.85rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--pico-muted-color);
}

/* Send Modal */
.amount-input {
  display: flex;
  gap: 0.5rem;
}

.amount-input input {
  flex: 1;
  margin: 0;
}

.amount-input button {
  margin: 0;
  padding: 0.5rem 1rem;
}

.error-message {
  color: var(--pico-del-color);
  padding: 0.5rem;
  background: rgba(255,0,0,0.1);
  border-radius: 4px;
  margin: 1rem 0;
}

dialog article footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

dialog article footer button {
  margin: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  z-index: 1000;
  animation: fadeInUp 0.3s ease;
}

.toast.success {
  background: var(--pico-ins-color);
}

.toast.error {
  background: var(--pico-del-color);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Footer */
body > div > footer {
  text-align: center;
  padding: 2rem;
  color: var(--pico-muted-color);
}

/* Small button variant */
button.small,
[type="button"].small {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 576px) {
  .wallet-card {
    padding: 1rem;
  }

  .balance h2 {
    font-size: 1.75rem;
  }

  .address-display code {
    font-size: 0.75rem;
  }

  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  nav ul:last-child {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
