/* Checkout & order status pages (checkout.php, order.php) */
.co-page { padding: 2rem 0 4rem; background: var(--bg-light); min-height: 70vh; }

.co-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.co-back {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.1rem; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff;
    color: var(--text-dark); font-weight: 600; font-size: 0.9rem; text-decoration: none; margin-bottom: 1.25rem;
}
.co-back:hover { border-color: var(--primary); color: var(--primary); }
.co-title { font-size: 1.9rem; font-weight: 800; color: var(--text-dark); margin: 0 0 0.35rem; }
.co-subtitle { color: var(--text-gray); margin: 0; }

.co-stepper {
    display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
    padding: 0.5rem 0.9rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 999px;
}
.co-stepper > i { font-size: 0.7rem; color: #f59e0b; }
.co-step { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.875rem; font-weight: 600; color: #94a3b8; }
.co-step-no {
    width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: #e2e8f0; color: #64748b; font-size: 0.75rem; font-weight: 700;
}
.co-step.active { color: var(--text-dark); }
.co-step.active .co-step-no { background: var(--primary); color: #fff; }
.co-step.done { color: var(--primary-dark); }
.co-step.done .co-step-no { background: #dcfce7; color: var(--primary-dark); }

.co-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.co-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 20px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04); padding: 1.5rem;
}
.co-card-head { display: flex; align-items: center; gap: 0.75rem; padding-bottom: 1.1rem; margin-bottom: 1.25rem; border-bottom: 1px solid #e5e7eb; }
.co-card-head h2 { font-size: 1.15rem; font-weight: 700; color: var(--text-dark); margin: 0; }
.co-card-icon {
    width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: #dcfce7; color: var(--primary); font-size: 1.05rem;
}

.co-field { margin-bottom: 1.25rem; }
.co-field label { display: block; font-weight: 700; color: #334155; font-size: 0.95rem; margin-bottom: 0.5rem; }
.co-field .req { color: #ef4444; }
.co-input { display: flex; border: 1px solid #d1d5db; border-radius: 10px; overflow: hidden; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.co-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.co-input.has-error { border-color: #ef4444; }
.co-input-icon {
    flex-shrink: 0; width: 44px; display: flex; align-items: center; justify-content: center;
    background: #ecfdf5; color: var(--primary-dark); border-right: 1px solid #d1d5db;
}
.co-input input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0.85rem 1rem; font-size: 1rem; font-family: inherit; color: var(--text-dark); background: transparent; }
.co-hint { display: block; margin-top: 0.4rem; font-size: 0.8rem; color: var(--text-gray); }
.co-error { display: block; margin-top: 0.4rem; font-size: 0.8rem; color: #dc2626; font-weight: 600; }
.co-alert-success {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1rem; border-radius: 10px;
    background: #d1fae5; color: #047857; font-weight: 600; font-size: 0.9rem;
}

.co-stack { display: grid; gap: 1.5rem; min-width: 0; }

/* Payment methods */
.co-methods { display: grid; gap: 0.75rem; }
.co-method { display: block; cursor: pointer; }
.co-method input { position: absolute; opacity: 0; pointer-events: none; }
.co-method-box {
    display: flex; align-items: center; gap: 0.9rem; padding: 0.95rem 1rem;
    border: 1.5px solid #e5e7eb; border-radius: 12px; background: #fff; transition: border-color 0.2s, background 0.2s;
}
.co-method:hover .co-method-box { border-color: #bbf7d0; }
.co-method input:focus-visible + .co-method-box { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
.co-method input:checked + .co-method-box { border-color: var(--primary); background: #f0fdf4; }
.co-method-icon {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: #ecfdf5; color: var(--primary-dark); font-size: 1.15rem;
}
.co-method-text { flex: 1; min-width: 0; }
.co-method-text strong { display: block; color: var(--text-dark); font-size: 0.95rem; }
.co-method-text small { display: block; color: var(--text-gray); font-size: 0.82rem; margin-top: 0.1rem; }
.co-method-check {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #cbd5e1;
    display: flex; align-items: center; justify-content: center; color: transparent; font-size: 0.7rem;
}
.co-method input:checked + .co-method-box .co-method-check { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Payment method card: locked until the contact data is complete */
.co-pay-lock {
    display: none; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; border-radius: 12px;
    background: #f8fafc; border: 1px dashed #cbd5e1; color: #475569;
}
.co-pay-lock > i { font-size: 1.3rem; color: #94a3b8; }
.co-pay-lock strong { display: block; color: var(--text-dark); font-size: 0.95rem; }
.co-pay-lock small { display: block; font-size: 0.82rem; margin-top: 0.15rem; }
.co-pay-card.is-locked .co-pay-lock { display: flex; }
.co-pay-card.is-locked .co-pay-body { display: none; }
.co-pay-card:not(.is-locked) .co-pay-body { animation: co-reveal 0.3s ease; }
@keyframes co-reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.co-btn.is-disabled { opacity: 0.55; cursor: not-allowed; }
.co-agree {
    display: flex; align-items: flex-start; gap: 0.6rem; margin: 0 0 0.9rem; padding: 0.75rem 0.85rem;
    border: 1px solid #e5e7eb; border-radius: 10px; font-size: 0.85rem; color: #475569; line-height: 1.5; cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.co-agree input { margin-top: 0.2rem; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--co-accent, var(--primary)); }
.co-agree a { color: var(--co-accent, var(--primary)); font-weight: 600; }
.co-agree.has-error { border-color: #ef4444; background: #fef2f2; }

/* Duitku channels */
.co-methods-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.co-methods-grid .co-method-box { padding: 0.7rem 0.8rem; gap: 0.7rem; }
.co-method-logo {
    flex-shrink: 0; width: 56px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 6px; color: #64748b;
}
.co-method-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.co-methods-grid .co-method-text strong { font-size: 0.85rem; line-height: 1.3; }
.co-sandbox {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; padding: 0.7rem 0.9rem;
    border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 0.85rem;
}
.co-alert-error {
    display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.85rem 1rem; border-radius: 10px; margin-bottom: 1rem;
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 0.9rem;
}

/* Summary */
.co-summary { position: sticky; top: 90px; }
.co-summary-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid #e5e7eb; }
.co-summary-head h2 { font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--text-dark); }
.co-summary-head h2 i { color: var(--primary); margin-right: 0.35rem; }
.co-pill { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.co-pill-blue { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.co-pill-red { background: #fee2e2; color: #dc2626; border-radius: 6px; padding: 0.2rem 0.5rem; }
.co-pill-green { background: #dcfce7; color: var(--primary-dark); border: 1px solid #bbf7d0; }
.co-pill-amber { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

.co-product { border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; margin-bottom: 1.25rem; }
.co-product-img { position: relative; aspect-ratio: 16 / 9; background: var(--bg-light); }
.co-product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-flash, .co-tech { position: absolute; top: 0.6rem; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.6rem; border-radius: 8px; font-size: 0.72rem; font-weight: 800; }
.co-flash { left: 0.6rem; background: #ef4444; color: #fff; }
.co-tech { right: 0.6rem; background: #fff; color: #2563eb; border: 1px solid #bfdbfe; }
.co-product-body { padding: 1rem; }
.co-product-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-dark); margin: 0 0 0.5rem; }
.co-product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; font-size: 0.85rem; color: var(--text-gray); }
.co-product-meta .ok { color: var(--primary-dark); font-weight: 600; }
.co-product-meta .ok i { color: var(--primary); }
.co-product-meta .dot { color: #cbd5e1; }

.co-coupon-label { display: block; font-weight: 700; font-size: 0.9rem; color: #334155; margin-bottom: 0.5rem; }
.co-coupon-label i { color: var(--primary); margin-right: 0.25rem; }
.co-coupon { display: flex; border: 1px solid #d1d5db; border-radius: 10px; overflow: hidden; }
.co-coupon:focus-within { border-color: var(--primary); }
.co-coupon input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0.8rem 1rem; font-size: 0.95rem; font-family: inherit; text-transform: uppercase; }
.co-coupon input::placeholder { text-transform: none; }
.co-coupon button { border: 0; background: var(--co-accent, var(--primary)); color: #fff; font-weight: 700; padding: 0 1.25rem; cursor: pointer; font-family: inherit; font-size: 0.95rem; }
.co-coupon button:hover { background: var(--co-accent-dark, var(--primary-dark)); }
.co-coupon button:disabled { opacity: 0.7; cursor: wait; }
.co-coupon-msg { display: block; min-height: 1.1em; margin-top: 0.4rem; font-size: 0.8rem; }
.co-coupon-msg.is-error { color: #dc2626; }
.co-coupon-msg.is-ok { color: var(--primary-dark); }

.co-coupon-result { margin-top: 0.6rem; padding: 0.85rem 1rem; border-radius: 10px; background: #f0fdf4; border: 1px dashed #86efac; display: grid; gap: 0.4rem; }
.co-coupon-result[hidden] { display: none; }
.co-coupon-result-row { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.875rem; color: #475569; }
.co-coupon-result-row.is-total { padding-top: 0.45rem; border-top: 1px solid #bbf7d0; color: var(--text-dark); font-weight: 600; }
.co-coupon-result-row.is-total strong { color: var(--primary); font-size: 1.05rem; }

.co-divider { border: 0; border-top: 1px solid #e5e7eb; margin: 1rem 0; }
.co-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; color: #475569; font-size: 0.95rem; }
.co-row[hidden] { display: none; }
.co-row-value { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.co-row-value s { color: #94a3b8; font-size: 0.85rem; }
.co-row-value strong { color: var(--text-dark); }
.co-discount { color: #dc2626; }

/* Checkout accent (blue) for the total and pay buttons */
.co-page { --co-accent: #2563eb; --co-accent-dark: #1d4ed8; }

.co-total {
    display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    margin: 1.25rem 0; padding: 1.25rem 1.4rem; border-radius: 16px; background: #f5f3ff; border: 1px solid #ddd6fe;
}
.co-total strong { display: block; color: var(--text-dark); font-size: 0.95rem; }
.co-total small { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.2rem; color: #059669; font-size: 0.82rem; font-weight: 500; }
.co-total small i { color: #10b981; }
.co-total-value { font-size: 1.75rem; font-weight: 800; color: var(--co-accent); }
.co-total-value.co-total-pending { font-size: 1.15rem; white-space: nowrap; }

.co-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%;
    padding: 1rem; border-radius: 10px; font-weight: 700; font-size: 1.05rem; font-family: inherit;
    text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background 0.2s;
}
.co-btn-primary { background: var(--co-accent, var(--primary)); color: #fff; border-color: var(--co-accent, var(--primary)); padding: 1.15rem 1rem; border-radius: 12px; }
.co-btn-primary:hover { background: var(--co-accent-dark, var(--primary-dark)); }
.co-btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.co-btn-outline:hover { background: #f0fdf4; }
.co-secure { text-align: center; font-size: 0.8rem; color: var(--text-gray); margin: 0.75rem 0 0; }

.co-notice { display: flex; gap: 1rem; align-items: flex-start; }
.co-notice > i { color: var(--primary); font-size: 1.5rem; }
.co-notice p { margin: 0.25rem 0 0; color: var(--text-gray); }

/* Order status page */
.os-status { text-align: center; padding: 1.5rem 0 1.75rem; }
.os-status-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; }
.os-status-icon.pending { background: #fef3c7; color: #d97706; }
.os-status-icon.paid { background: #dcfce7; color: var(--primary); }
.os-status-icon.cancelled { background: #fee2e2; color: #dc2626; }
.os-status h2 { font-size: 1.35rem; margin: 0 0 0.35rem; color: var(--text-dark); }
.os-status p { color: var(--text-gray); margin: 0 auto; max-width: 480px; }
.os-pay { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.os-qris { text-align: center; padding: 1rem; border: 1px dashed #cbd5e1; border-radius: 14px; }
.os-qris img { max-width: 260px; width: 100%; height: auto; }
.os-qris small { display: block; margin-top: 0.5rem; color: var(--text-gray); }
.os-payinfo { padding: 1rem 1.25rem; border-radius: 14px; background: var(--bg-light); color: #334155; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.os-meta { display: grid; gap: 0.6rem; }
.os-meta .co-row { margin: 0; }
.os-copy { border: 0; background: none; color: var(--primary); cursor: pointer; padding: 0 0.25rem; }

/* Live payment (QRIS / VA from Duitku) */
.os-qr-box { text-align: center; padding: 1.25rem 1rem; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.os-qr-head { font-weight: 700; color: var(--text-dark); margin-bottom: 1rem; }
.os-qr-head i { color: var(--co-accent, var(--primary)); margin-right: 0.3rem; }
.os-qr { display: inline-block; padding: 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; line-height: 0; }
.os-qr img, .os-qr canvas { display: block; max-width: 100%; height: auto; }
.os-qr-amount { font-size: 1.6rem; font-weight: 800; color: var(--co-accent, var(--primary)); margin: 0.9rem 0 0.35rem; }
.os-qr-box small { display: block; color: var(--text-gray); font-size: 0.82rem; max-width: 380px; margin: 0 auto; }
.os-va { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 12px; background: #f5f3ff; border: 1px dashed #c4b5fd; }
.os-va span { font-family: monospace; font-size: 1.4rem; font-weight: 700; letter-spacing: 1px; color: var(--text-dark); overflow-wrap: anywhere; }
.os-va .os-copy { font-weight: 600; white-space: nowrap; }
.os-waiting { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-top: 1rem; font-size: 0.875rem; color: var(--text-gray); }
.os-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c7d2fe; border-top-color: var(--co-accent, var(--primary)); animation: os-spin 0.8s linear infinite; }
@keyframes os-spin { to { transform: rotate(360deg); } }

.os-dl-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 1rem; margin: 0.75rem 0 0.25rem; font-size: 0.8rem; color: var(--text-gray); }
.os-dl-info i { color: var(--primary); margin-right: 0.2rem; }

.os-change { margin-top: 1rem; border: 1px solid #e5e7eb; border-radius: 12px; padding: 0.75rem 1rem; }
.os-change summary { cursor: pointer; font-weight: 600; color: var(--co-accent, var(--primary)); font-size: 0.9rem; }
.os-change[open] summary { margin-bottom: 0.9rem; }

@media (max-width: 992px) {
    .co-grid { grid-template-columns: 1fr; }
    .co-summary { position: static; }
}
@media (max-width: 600px) {
    .co-methods-grid { grid-template-columns: 1fr; }
    .co-card { padding: 1.1rem; border-radius: 16px; }
    .co-title { font-size: 1.5rem; }
    .co-step { font-size: 0.8rem; }
    .co-total-value { font-size: 1.35rem; }
}
