/* portal.css — dWallet Nodes portal-specific components, built on top
   of the vendored dwallet.bot design tokens (see base.css/hero.css/
   sections.css for the source brand system). Not part of the vendored
   set — written for this product specifically. */

/* Safety net: a fixed-width or unwrapped-text element anywhere on the
   page (e.g. a long endpoint path) should never be able to force the
   whole page to scroll horizontally on mobile. Individual wide elements
   should scroll internally (see .endpoint-path below) instead. */
html, body { overflow-x: hidden; max-width: 100%; }

.navbar-cta-plain {
  background: transparent;
  border: none;
  color: rgba(200, 200, 220, 0.85);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.navbar-cta-plain:hover { color: #fff; }

.portal-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 140px 24px 80px;
}

.portal-card {
  background: rgba(20, 18, 32, 0.55);
  border: 1px solid rgba(191, 90, 242, 0.18);
  border-radius: 14px;
  padding: 32px;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
}

.portal-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 8px;
  color: #fff;
}

.portal-subtitle {
  color: rgba(200, 200, 220, 0.75);
  margin-bottom: 24px;
  line-height: 1.5;
}

.portal-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(200, 200, 220, 0.9);
  margin-bottom: 6px;
}

.tier-price-list { margin-bottom: 20px; }
.tier-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(191, 90, 242, 0.15);
}
.tier-price { font-family: 'JetBrains Mono', monospace; color: #c9a227; font-weight: 700; }
.tier-price-limits { color: rgba(200, 200, 220, 0.6); font-size: 0.85rem; flex: 1 1 auto; text-align: right; }

.portal-form input[type="email"],
.portal-form input[type="text"],
.portal-form select,
.portal-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(191, 90, 242, 0.3);
  background: rgba(5, 5, 16, 0.6);
  color: #fff;
  font: inherit;
  margin-bottom: 20px;
}
.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus {
  outline: none;
  border-color: #bf5af2;
  box-shadow: 0 0 0 3px rgba(191, 90, 242, 0.15);
}

.portal-key-display {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(5, 5, 16, 0.8);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 8px;
  padding: 16px;
  word-break: break-all;
  color: #c9a227;
  font-size: 1rem;
  margin: 16px 0;
}

.portal-alert {
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.portal-alert-warning {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: #e8d08a;
}
.portal-alert-error {
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.4);
  color: #ff8a80;
}
.portal-alert-success {
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.4);
  color: #7fe89f;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.portal-table th, .portal-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(191, 90, 242, 0.15);
}
.portal-table th {
  color: rgba(200, 200, 220, 0.7);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.portal-table td { color: rgba(255, 255, 255, 0.9); font-family: 'JetBrains Mono', monospace; }

/* Endpoint list (landing page) — deliberately not a <table>: a rigid
   3-column table with a long monospace path plus a description forces
   horizontal overflow on narrow viewports. This wraps naturally instead. */
.endpoint-list { display: flex; flex-direction: column; }
.endpoint-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(191, 90, 242, 0.15);
}
.endpoint-row:last-child { border-bottom: none; }
.endpoint-method {
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #30d158;
  min-width: 42px;
}
.endpoint-method-post { color: #c9a227; }
.endpoint-path {
  flex: 1 1 auto;
  min-width: 0;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255, 255, 255, 0.9);
  word-break: break-all;
}
.endpoint-desc {
  flex: 1 1 100%;
  color: rgba(200, 200, 220, 0.65);
  font-size: 0.9rem;
}
@media (min-width: 560px) {
  .endpoint-desc { flex: 0 1 auto; margin-left: auto; text-align: right; }
}

.portal-stat-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.portal-stat {
  flex: 1;
  min-width: 140px;
}
.portal-stat-label {
  font-size: 0.8rem;
  color: rgba(200, 200, 220, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.portal-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: #fff;
}

.portal-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.portal-badge-free { background: rgba(200, 200, 220, 0.15); color: rgba(255,255,255,0.85); }
.portal-badge-tier1 { background: rgba(10, 132, 255, 0.15); color: #6fb3ff; }
.portal-badge-tier2 { background: rgba(201, 162, 39, 0.18); color: #e8d08a; }

/* Admin: deliberately plain/functional, not brand-styled — an internal
   tool, not a marketing surface. */
.admin-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 140px 24px 80px;
  font-family: system-ui, sans-serif;
  color: #ddd;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.03);
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.1);
}
.admin-table select, .admin-table button, .admin-form input, .admin-form button {
  font: inherit;
  padding: 4px 8px;
}

/* Tier config editor — a CSS grid, not an HTML table, specifically
   because each row needs to be its own <form> (independent submit per
   tier) and a <form> is not valid as a direct child of <tr>/<table>.
   display:contents on the form lets its child divs participate directly
   as grid items in the parent grid, so alignment still works. */
.tier-config-grid {
  display: grid;
  grid-template-columns: 100px 100px 120px 140px 80px;
  gap: 4px 12px;
  align-items: center;
}
.tier-config-header {
  font-weight: 700;
  color: #999;
  font-size: 0.85rem;
  padding-bottom: 6px;
  border-bottom: 1px solid #333;
}
.tier-config-row { display: contents; }
.tier-config-row input { width: 100%; font: inherit; padding: 4px 6px; }
.tier-config-row button { font: inherit; padding: 4px 8px; }

/* Explorer copy-to-clipboard buttons -- see partials/foot.eta for the
   shared delegated click handler. */
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(200, 200, 220, 0.6);
  font-size: 0.85em;
  padding: 0 4px;
  vertical-align: middle;
}
.copy-btn:hover { color: #BF5AF2; }
