*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Page ──────────────────────────────────────────────────────────────────── */
.qpv3-body {
    min-height: 100vh;
    background: #0a0a14;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 16px;
}

/* ── Screens ───────────────────────────────────────────────────────────────── */
.qpv3-wrap { width: 100%; max-width: 440px; }
.qpv3-screen { display: none; }
.qpv3-screen.active { display: block; }

/* ── Card ──────────────────────────────────────────────────────────────────── */
.cko-ls-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 32px 80px rgba(0,0,0,0.45);
    padding-bottom: 4px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.cko-ls-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 24px 20px;
    text-align: center;
}

.cko-ls-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.cko-ls-logo svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.cko-ls-title {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.cko-ls-sub {
    font-size: 13px;
    color: #9ca3af;
}

/* ── Preserved error (server-side redirect error) ──────────────────────────── */
.cko-ls-preserved-error {
    margin: 0 20px 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    font-size: 13px;
    color: #dc2626;
    font-weight: 500;
}

/* ── Form fields ───────────────────────────────────────────────────────────── */
.cko-ls-field {
    padding: 0 20px 14px;
}

.cko-ls-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 6px;
}

.cko-ls-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 14px;
    height: 48px;
    gap: 10px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.cko-ls-input-wrap:focus-within {
    border-color: #6366f1;
    background: #fafaff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

/* green dot — valid email indicator */
.cko-ls-valid-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    display: none;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.25);
}

.cko-ls-valid-dot.visible { display: block; }

.cko-ls-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cko-ls-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #9ca3af;
}

.cko-ls-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #111827;
    background: transparent;
    font-family: inherit;
    min-width: 0;
    -moz-appearance: textfield;
}

.cko-ls-input::placeholder { color: #d1d5db; }
.cko-ls-input::-webkit-outer-spin-button,
.cko-ls-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Amount hint */
.cko-ls-amount-hint {
    margin-top: 7px;
    font-size: 12px;
    color: #6b7280;
}

.cko-ls-hl {
    color: #6366f1;
    font-weight: 600;
}

/* Field error messages */
.cko-ls-err {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: #ef4444;
    font-weight: 500;
}

.cko-ls-err.visible { display: block; }

/* ── Payment Methods ───────────────────────────────────────────────────────── */
.cko-ls-methods-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 10px;
}

.cko-ls-methods-row1,
.cko-ls-methods-row2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

/* Method button */
.cko-ls-method {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 6px 10px;
    border: 1.5px solid #e8eaed;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    min-height: 90px;
    font-family: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cko-ls-method:hover {
    border-color: #a5b4fc;
    background: #fafaff;
    box-shadow: 0 2px 10px rgba(99,102,241,0.12);
}

.cko-ls-method.cko-ls-active {
    border-color: #6366f1;
    background: #f5f3ff;
    box-shadow: 0 0 0 2px #6366f1, 0 2px 12px rgba(99,102,241,0.18);
}

/* Checkmark badge */
.cko-ls-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.18s, transform 0.18s;
    box-shadow: 0 1px 4px rgba(34,197,94,0.4);
}

.cko-ls-method.cko-ls-active .cko-ls-badge {
    opacity: 1;
    transform: scale(1);
}

.cko-ls-badge svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Payment icons */
.cko-ls-pay-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.13);
}

.cko-ls-pay-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.cko-ls-pay-icon.cashapp  { background: #00d632; }
.cko-ls-pay-icon.gpay     { background: #fff; border: 1.5px solid #e8eaed; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cko-ls-pay-icon.applepay { background: #fff; border: 1.5px solid #e8eaed; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cko-ls-pay-icon.paypal   { background: #fff; border: 1.5px solid #e8eaed; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cko-ls-pay-icon.chime    { background: #fff; border: 1.5px solid #e8eaed; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cko-ls-pay-icon.btc      { background: #f7931a; }

.cko-ls-pay-icon.cashapp img  { width: 36px; height: 36px; }
.cko-ls-pay-icon.applepay img { width: 36px; height: 36px; }
.cko-ls-pay-icon.gpay img     { width: 38px; height: 38px; }
.cko-ls-pay-icon.chime img    { width: 38px; height: 38px; }
.cko-ls-pay-icon.paypal img   { width: 34px; height: 34px; }
.cko-ls-pay-icon.btc img      { width: 32px; height: 32px; }

/* Method name */
.cko-ls-method-name {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: 0.1px;
}

/* Invisible spacers */
.cko-ls-method-spacer {
    min-height: 90px;
    visibility: hidden;
}

/* ── Divider ───────────────────────────────────────────────────────────────── */
.cko-ls-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 4px 20px 16px;
}

/* ── Proceed button ────────────────────────────────────────────────────────── */
.cko-ls-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100% - 40px);
    margin: 0 20px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #5457e8, #7c82f5);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
    font-family: inherit;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 18px rgba(99,102,241,0.45);
}

.cko-ls-btn:hover:not(:disabled) {
    opacity: 0.93;
    box-shadow: 0 6px 24px rgba(99,102,241,0.55);
}
.cko-ls-btn:active:not(:disabled) { transform: scale(0.98); }
.cko-ls-btn:disabled {
    background: #e9eaec;
    color: #b0b7c3;
    cursor: not-allowed;
    box-shadow: none;
}

.cko-ls-arrow {
    font-size: 20px;
    line-height: 1;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.cko-ls-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 20px 16px;
    font-size: 12px;
    color: #9ca3af;
}

.cko-ls-footer svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #9ca3af;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ── Status cards ──────────────────────────────────────────────────────────── */
.cko-ls-status-card { padding-bottom: 28px; }

.cko-ls-status-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px 0;
}

/* Spinner */
.cko-ls-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: cko-spin 0.8s linear infinite;
    margin-bottom: 24px;
}

@keyframes cko-spin { to { transform: rotate(360deg); } }

.cko-ls-status-title {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cko-ls-status-sub {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    max-width: 280px;
    margin-bottom: 20px;
}

/* Status icons */
.cko-ls-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.cko-ls-icon-success { background: #22c55e; }
.cko-ls-icon-failed  { background: #ef4444; }

/* ── Receipt ───────────────────────────────────────────────────────────────── */
.cko-ls-receipt {
    width: 100%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    margin-bottom: 16px;
}

.cko-ls-receipt-heading {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
}

.cko-ls-receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.cko-ls-receipt-row span:first-child {
    color: #6b7280;
    font-weight: 500;
}

.cko-ls-receipt-val {
    font-weight: 600;
    color: #111827;
    text-align: right;
    max-width: 180px;
    word-break: break-all;
}

.cko-ls-receipt-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* ── Action button (success/failed) ────────────────────────────────────────── */
.cko-ls-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s, transform 0.1s;
}

.cko-ls-action-btn:hover  { opacity: 0.92; }
.cko-ls-action-btn:active { transform: scale(0.98); }

/* ── Print ─────────────────────────────────────────────────────────────────── */
@media print {
    .qpv3-body { background: #fff; padding: 0; }
    .cko-ls-card { box-shadow: none; }
    .cko-ls-btn, .cko-ls-action-btn, .cko-ls-footer { display: none; }
    #qpv3-screen-success { display: block !important; }
    #qpv3-screen-form, #qpv3-screen-verifying, #qpv3-screen-failed { display: none !important; }
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .qpv3-body { padding: 0; align-items: flex-start; }
    .cko-ls-card { border-radius: 0; }
    .qpv3-wrap { max-width: 100%; }
}
