/* checkout.css - gaya khusus halaman checkout.
 * Token warna/font diambil dari css/style.css. File ini tidak mengubahnya.
 */

.co-wrap { padding-top: 22px; }
.co-back { margin-bottom: 6px; }
.co-back svg { vertical-align: -2px; }
.co-title { margin-top: 0; }
.co-sub { margin-top: -6px; }

/* ---------- timeline stepper ---------- */
.co-stepper { margin: 28px 0 24px; }
.co-stepper ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; position: relative;
}
.co-stepper ol::before {
  content: ""; position: absolute; top: 14px;
  left: calc(100% / 6); right: calc(100% / 6);
  height: 1px; background: var(--line);
}
.co-stepper li {
  flex: 1; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.co-node {
  width: 29px; height: 29px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--bg);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.co-node .co-num {
  font-family: var(--serif); font-style: italic;
  font-size: 0.95rem; line-height: 1;
}
.co-node .co-check { display: none; }
.co-lab { font-size: 0.82rem; color: var(--muted); }
/* upcoming = hollow + muted (default di atas) */
/* active = dot emas terisi + label terang */
.co-stepper li.active .co-node {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.co-stepper li.active .co-lab { color: var(--ink); font-weight: 600; }
/* done = lingkaran emas penuh + cek */
.co-stepper li.done .co-node {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.co-stepper li.done .co-node .co-num { display: none; }
.co-stepper li.done .co-node .co-check { display: block; }
.co-stepper li.done .co-lab { color: var(--ink); }

/* ---------- chip sesi login ---------- */
.co-session {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius-ctl);
  padding: 9px 13px; margin: 4px 0 16px; font-size: 0.88rem;
}
.co-session[hidden] { display: none; }
.co-chip { color: var(--muted); }
.co-chip strong { color: var(--ink); font-weight: 600; }

/* ---------- FAB WhatsApp ---------- */
.co-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 15;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: filter 0.2s, transform 0.15s var(--ease-out);
}
.co-fab:hover { filter: brightness(1.07); }
.co-fab:active { transform: scale(0.94); }
.co-fab[hidden] { display: none; }

/* ---------- skeleton saat harga dimuat dari server ---------- */
.co-skel {
  border-radius: 8px;
  background: linear-gradient(100deg, var(--surface2) 40%, var(--line) 50%, var(--surface2) 60%);
  background-size: 200% 100%;
  animation: co-shimmer 1.1s linear infinite;
  color: transparent !important; user-select: none;
}
@keyframes co-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .co-skel { animation: none; }
}

/* ---------- layout dua kolom ---------- */
.co-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas: "main aside";
  gap: 20px; align-items: start;
}
.co-main { grid-area: main; min-width: 0; }
.co-summary { grid-area: aside; margin: 0; position: sticky; top: 92px; }

.co-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px 26px;
}
.co-panel[hidden] { display: none; }
.co-panel h2 { margin: 0 0 0.3em; }
.co-panel > .muted { margin: 0 0 0.8em; }
.co-panel .row { margin-top: 20px; }
.co-panel .row .btn.primary { flex: 1; }

/* ---------- error validasi inline ---------- */
.co-error {
  color: var(--danger); font-size: 0.86rem; margin: 4px 0 6px;
}
input.co-invalid { border-color: var(--danger); }

/* ---------- QRIS ---------- */
.qris-box {
  background: #fff; border-radius: 12px;
  padding: 22px; margin: 18px auto;
  width: fit-content;
  box-shadow: 0 0 0 1px var(--line);
}
.qris-box img { display: block; width: 260px; height: 260px; }
.co-meta {
  margin: 16px 0; padding: 0;
  border-top: 1px solid var(--line);
}
.co-meta > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.co-meta dt { color: var(--muted); font-size: 0.88rem; }
.co-meta dd { margin: 0; font-size: 0.95rem; text-align: right; }
.co-nominal {
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem !important;
  color: var(--accent);
}

/* ---------- ringkasan ---------- */
.co-summary h2 { margin-top: 0; font-size: 1.05rem; }
.co-product { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; margin: 0.4em 0 0.2em; }
.co-price {
  font-family: var(--serif); font-weight: 600; font-size: 1.9rem;
  color: var(--accent); margin: 0.1em 0 0.6em;
  font-variant-numeric: tabular-nums;
}
.co-terms { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; }
.co-terms li { font-size: 0.88rem; color: var(--muted); padding-left: 20px; position: relative; }
.co-terms li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

/* ---------- konfirmasi ---------- */
.co-note { margin-top: 16px; }
.co-unconfigured {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: var(--radius-card);
  padding: 22px 20px; margin: 16px 0; text-align: center;
}
.co-unconfigured strong { font-family: var(--serif); font-size: 1.05rem; display: block; margin-bottom: 6px; }
.co-unconfigured p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- mobile: satu kolom, ringkasan di atas ---------- */
@media (max-width: 900px) {
  .co-layout { grid-template-columns: 1fr; grid-template-areas: "aside" "main"; }
  .co-summary { position: static; }
  .co-lab { font-size: 0.76rem; }
  .co-fab { right: 16px; bottom: 16px; }
  .co-panel { padding: 22px 18px; }
  .co-panel .row { flex-direction: column; align-items: stretch; }
  .co-panel .row .btn { width: 100%; }
  .qris-box img { width: 230px; height: 230px; }
}
