/* =============================================
   SIMPLIGEN — checkout.css
   ============================================= */

:root {
  --bg:        #f0ece5;
  --card-bg:   #ffffff;
  --border:    #e0dbd3;
  --text:      #111111;
  --muted:     #6b7280;
  --accent:    #ff57d8;
  --radius:    10px;
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body   { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; min-height: 100vh; }
img    { display: block; }
button { cursor: pointer; font-family: inherit; }
a      { text-decoration: none; color: inherit; }

/* ===== HEADER ===== */
.co-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.co-header__title {
  font-size: 20px;
  font-weight: 700;
}
.co-header__back {
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 6px;
  background: white;
  transition: border-color 0.15s;
}
.co-header__back:hover { border-color: #aaa; }

/* ===== LAYOUT ===== */
.co-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  max-width: 960px;
  margin: 40px auto;
  padding: 0 24px 60px;
  align-items: start;
}

/* ===== CARD ===== */
.co-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.co-card--info {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  background: #eef4ff;
  border-color: #b8d0ff;
  color: #1a3a6e;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ===== PRODUCT ROW ===== */
.co-product {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.co-product__badge {
  position: absolute;
  top: -8px; left: -8px;
  width: 20px; height: 20px;
  background: #111;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.co-product__img {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.co-product__info  { flex: 1; }
.co-product__name  { font-weight: 600; font-size: 15px; }
.co-product__seller{ font-size: 13px; color: var(--muted); margin-top: 2px; }
.co-product__price { font-weight: 600; font-size: 15px; }

/* ===== ROWS ===== */
.co-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
.co-row--total {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ===== DISCOUNT ===== */
.co-discount {
  display: flex;
  gap: 10px;
}
.co-discount .co-input { flex: 1; }

/* ===== SECTION TITLE ===== */
.co-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

/* ===== INPUTS ===== */
.co-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}
.co-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.co-input:focus { border-color: #888; }
.co-input--mono { font-family: 'Courier New', monospace; font-size: 13px; }
.co-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ===== METHOD TAB ===== */
.co-method-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid #111;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  background: #fff;
}

/* ===== AMOUNT BOX ===== */
.co-amount-box {
  background: #f9f6f2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
}
.co-amount-box__label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.co-amount-box__value { font-size: 24px; font-weight: 700; }
.co-amount-box__equiv { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ===== ADDRESS BOX ===== */
.co-address-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  margin-top: 6px;
}
.co-address-box__addr {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  word-break: break-all;
  color: var(--text);
}
.co-address-box__copy {
  background: none;
  border: none;
  padding: 4px;
  color: var(--muted);
  flex-shrink: 0;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.co-address-box__copy:hover { background: #f0f0f0; color: #111; }
.co-address-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

/* ===== METAMASK ===== */
.co-metamask { display: flex; flex-direction: column; gap: 8px; }
.co-btn-metamask {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2761b;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #e2761b;
  transition: background 0.15s;
}
.co-btn-metamask:hover { background: #fff8f3; }
.co-metamask__status {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  min-height: 18px;
}
.co-metamask__status.success { color: #16a34a; }
.co-metamask__status.error   { color: #dc2626; }

/* ===== DIVIDER TEXT ===== */
.co-divider-text {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  position: relative;
}
.co-divider-text::before,
.co-divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--border);
}
.co-divider-text::before { left: 0; }
.co-divider-text::after  { right: 0; }

/* ===== PAY BUTTON ===== */
.co-btn-pay {
  width: 100%;
  padding: 14px;
  background: #111;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  transition: background 0.15s;
}
.co-btn-pay:hover    { background: #333; }
.co-btn-pay:disabled { background: #999; cursor: not-allowed; }

/* ===== OUTLINE BUTTON ===== */
.co-btn-outline {
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.15s;
}
.co-btn-outline:hover { border-color: #888; }

/* ===== DISCLAIMER ===== */
.co-disclaimer {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

/* ===== SUCCESS MODAL ===== */
.co-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}
.co-modal__box {
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.co-modal__icon {
  width: 56px;
  height: 56px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.co-modal__box h2 { font-size: 20px; margin-bottom: 10px; }
.co-modal__box p  { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.co-modal__tx {
  font-size: 12px;
  word-break: break-all;
  color: var(--muted);
  background: #f9f9f9;
  border-radius: 6px;
  padding: 10px;
}

/* ===== NETWORK BADGE ===== */
.co-network-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #1d4ed8;
}

/* ===== CONNECT BUTTON ===== */
.co-btn-connect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s;
}
.co-btn-connect:hover { background: #333; }

.co-hint {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* ===== CONNECTED WALLET INFO ===== */
.co-wallet-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 14px;
}
.co-wallet-info__dot {
  width: 8px; height: 8px;
  background: #16a34a;
  border-radius: 50%;
  flex-shrink: 0;
}
.co-wallet-info__balance {
  flex: 1;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}
.co-wallet-info__disconnect {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
}
.co-wallet-info__disconnect:hover { background: #fee2e2; color: #dc2626; }

/* ===== PAY STEPS ===== */
.co-pay-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.co-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.co-step__num {
  width: 22px; height: 22px;
  background: #e5e7eb;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-step__text { flex: 1; }
.co-step__status { font-size: 14px; }

/* ===== STATUS ===== */
.co-status {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  min-height: 18px;
  margin-top: 6px;
}
.co-status--error   { color: #dc2626; }
.co-status--success { color: #16a34a; }

/* ===== WALLET MODAL ===== */
.wm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 600;
  padding: 20px;
}
.wm-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 20px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.wm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.wm-title {
  font-size: 18px;
  font-weight: 700;
}
.wm-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.wm-close:hover { background: #f3f4f6; }
.wm-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.wm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.wm-wallet-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.wm-wallet-btn:hover { background: #f3f4f6; border-color: #d1d5db; }
.wm-wallet-icon {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wm-wallet-icon img { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; }
.wm-empty {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  padding: 20px 0;
  line-height: 1.6;
}
.wm-empty a { color: #0052ff; text-decoration: underline; }
.wm-footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.wm-footer a { color: #0052ff; text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  .co-layout { grid-template-columns: 1fr; padding: 0 16px 40px; }
  .co-header  { padding: 16px 20px; }
}
