/* ============================================================
   Kaimacoin Merchant MVP
   UI-only prototype. No API/database dependency.
   ============================================================ */

.merchant-entry {
  margin: 18px 0 8px;
}

.merchant-entry button {
  width: 100%;
}

.merchant-workspace {
  margin-top: 18px;
}

.merchant-workspace.hidden {
  display: none;
}

.wallet-shell.merchant-mode > .balance-card,
.wallet-shell.merchant-mode > .action-grid,
.wallet-shell.merchant-mode > .wallet-grid,
.wallet-shell.merchant-mode > #transactionsPanel {
  display: none;
}

.wallet-shell.merchant-mode .merchant-entry {
  display: none;
}

.merchant-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.merchant-topbar h2 {
  margin: 0;
}

.merchant-topbar p {
  margin: 4px 0 0;
}

.merchant-screen {
  display: none;
}

.merchant-screen.active {
  display: block;
}

.merchant-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.merchant-stat {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
}

.merchant-stat span {
  display: block;
  font-size: 12px;
  opacity: .7;
  margin-bottom: 8px;
}

.merchant-stat strong {
  font-size: 24px;
}

.merchant-card {
  margin-bottom: 18px;
}

.merchant-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.merchant-card-head h3 {
  margin: 0;
}

.merchant-table {
  width: 100%;
  border-collapse: collapse;
}

.merchant-table th,
.merchant-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.07);
  vertical-align: middle;
}

.merchant-table th {
  font-size: 12px;
  opacity: .65;
  text-transform: uppercase;
}

.merchant-state {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,.08);
}

.merchant-state.confirmation {
  background: rgba(255,193,7,.12);
}

.merchant-state.settled {
  background: rgba(46,204,113,.12);
}

.merchant-state.proof {
  background: rgba(52,152,219,.12);
}

.merchant-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.merchant-form-grid .full-width {
  grid-column: 1 / -1;
}

.merchant-step {
  margin-bottom: 18px;
}

.merchant-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.merchant-step-number {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  font-weight: 700;
}

.merchant-review {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}

.merchant-review-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.merchant-review-row:last-child {
  border-bottom: 0;
}

.merchant-amount {
  font-size: 26px;
  font-weight: 800;
}

.merchant-timeline {
  position: relative;
  margin: 20px 0;
  padding-left: 24px;
}

.merchant-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background: rgba(255,255,255,.1);
}

.merchant-timeline-item {
  position: relative;
  padding: 0 0 20px 16px;
}

.merchant-timeline-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255,255,255,.04);
}

.merchant-timeline-item strong {
  display: block;
  margin-bottom: 3px;
}

.merchant-timeline-item small {
  opacity: .65;
}

.merchant-proof-box {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  margin-bottom: 14px;
}

.merchant-proof-id {
  font-family: monospace;
  word-break: break-all;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}

.merchant-verified {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(46,204,113,.25);
  background: rgba(46,204,113,.06);
  margin-bottom: 18px;
}

.merchant-verified strong {
  display: block;
  font-size: 20px;
  margin-bottom: 5px;
}

.merchant-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.merchant-empty {
  text-align: center;
  padding: 28px 12px;
  opacity: .7;
}

.merchant-demo-note {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  background: rgba(255,193,7,.08);
  border: 1px solid rgba(255,193,7,.15);
}

.merchant-back {
  margin-bottom: 12px;
}

@media (max-width: 800px) {
  .merchant-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merchant-form-grid {
    grid-template-columns: 1fr;
  }

  .merchant-form-grid .full-width {
    grid-column: auto;
  }

  .merchant-table {
    font-size: 13px;
  }

  .merchant-table th:nth-child(2),
  .merchant-table td:nth-child(2) {
    display: none;
  }
}

@media (max-width: 480px) {
  .merchant-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .merchant-stat strong {
    font-size: 20px;
  }

  .merchant-topbar {
    align-items: flex-start;
  }
}
