/* Crypto Price Alert v1.0.0 — styles for alert.html / the embeddable widget.
 * Gold-on-dark Cryptobanking look, matching the CryptoPay Ticker.
 * MIT License. Copyright (c) 2026 Hans Mondé — Cryptobanking. */

.cpa-alert {
  box-sizing: border-box;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 22px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #f5f0e1;
  background: #1a1a1a;
  border: 1px solid #c9a227;
  border-radius: 12px;
}

.cpa-alert *,
.cpa-alert *::before,
.cpa-alert *::after { box-sizing: border-box; }

.cpa-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.cpa-title {
  font-size: 1.35em;
  font-weight: 700;
  color: #ffd700;
}

.cpa-currency {
  font-size: 0.85em;
  font-weight: 700;
  color: #c9a227;
}

.cpa-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.9em;
  color: #d8d2c0;
}

.cpa-lang-select {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  font: inherit;
  color: #f5f0e1;
  background: #262626;
  border: 1px solid #555;
  border-radius: 8px;
}

.cpa-lang-select:focus {
  outline: 2px solid #ffd700;
  outline-offset: 1px;
  border-color: #ffd700;
}

.cpa-fallback {
  margin: 0 0 12px;
  padding: 9px 11px;
  background: #2b2205;
  border: 1px solid #c9a227;
  border-radius: 8px;
  color: #ffe9a8;
  font-size: 0.9em;
}

.cpa-subtitle {
  margin: 0 0 14px;
  color: #d8d2c0;
}

.cpa-limit {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: #2b2205;
  border: 1px solid #c9a227;
  border-radius: 8px;
  color: #ffe9a8;
  font-size: 0.95em;
}

.cpa-prices { margin-bottom: 6px; }

.cpa-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid #333;
}

.cpa-row:last-child { border-bottom: none; }

.cpa-symbol { font-weight: 700; min-width: 64px; }
.cpa-name { color: #b8b2a0; flex: 1; }
.cpa-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.cpa-price-missing { color: #999; }

.cpa-badge {
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.cpa-badge-live { background: #1e5c2e; color: #b9f6c8; }
.cpa-badge-estimate { background: #5c4a12; color: #ffe9a8; }

.cpa-note { margin: 8px 0 0; font-size: 0.9em; color: #b8b2a0; }
.cpa-note-error { color: #ff9d9d; font-weight: 700; }

.cpa-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.cpa-field { display: flex; flex-direction: column; gap: 4px; }
.cpa-field span { font-size: 0.9em; color: #d8d2c0; }

.cpa-field select,
.cpa-field input {
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  color: #f5f0e1;
  background: #262626;
  border: 1px solid #555;
  border-radius: 8px;
}

.cpa-field select:focus,
.cpa-field input:focus {
  outline: 2px solid #ffd700;
  outline-offset: 1px;
  border-color: #ffd700;
}

.cpa-set,
.cpa-clear {
  padding: 11px 14px;
  font: inherit;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

.cpa-set {
  color: #1a1a1a;
  background: #ffd700;
  border: 1px solid #ffd700;
}

.cpa-set:hover { background: #ffe14d; }

.cpa-clear {
  color: #f5f0e1;
  background: transparent;
  border: 1px solid #888;
}

.cpa-clear:hover { border-color: #ffd700; color: #ffd700; }

.cpa-sound {
  display: block;
  margin-top: 14px;
  font-size: 0.95em;
  color: #d8d2c0;
  cursor: pointer;
}

.cpa-sound input { accent-color: #ffd700; }

.cpa-status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #262626;
  border: 1px solid #444;
}

.cpa-status-armed { border-color: #c9a227; background: #2b2205; }
.cpa-status-hit {
  border-color: #ffd700;
  background: #3d2f00;
  color: #ffe9a8;
  font-size: 1.05em;
}
.cpa-status-error { border-color: #c0392b; color: #ff9d9d; }

.cpa-disclaimer {
  margin: 16px 0 0;
  font-size: 0.85em;
  color: #a8a28f;
}

.cpa-buy { margin: 18px 0 6px; text-align: center; }

.cpa-buy-button {
  display: inline-block;
  padding: 12px 20px;
  font-weight: 700;
  color: #1a1a1a;
  background: #ffd700;
  border-radius: 8px;
  text-decoration: none;
}

.cpa-buy-button:hover { background: #ffe14d; }

.cpa-buyline {
  margin: 0;
  font-size: 0.85em;
  color: #a8a28f;
  text-align: center;
}

.cpa-footer { margin: 16px 0 0; text-align: center; }
.cpa-footer a { color: #ffd700; text-decoration: none; }
.cpa-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .cpa-form { grid-template-columns: 1fr; }
  .cpa-alert { padding: 16px; }
}
