@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@400;500&display=swap');

:root {
    --co-ink: #0d0f14;
    --co-paper: #f4f3ef;
    --co-card: #ffffff;
    --co-border: #e5e3de;
    --co-subtle: #9ca3af;
    --co-ice: #f8fafc;
    --co-glow: rgba(13, 15, 20, .06);
}

.checkout-wrap {
    font-family: 'DM Sans', sans-serif;
    display: grid;
    grid-template-columns: 25% 75%;
    min-height: 100vh;
    background: #f4f3ef;
}

/* ── SIDEBAR ── */
.co-sidebar {
    background: #0d0f14;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.co-brand {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .35);
}

.co-plan-name {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
}

.co-price-block {
    padding: 1.25rem 0;
    border-top: .5px solid rgba(255, 255, 255, .1);
    border-bottom: .5px solid rgba(255, 255, 255, .1);
}

.co-price-amount {
    font-family: 'DM Mono', monospace;
    font-size: 38px;
    font-weight: 500;
    color: #fff;
    letter-spacing: -1.5px;
    line-height: 1;
}

.co-price-period {
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
    margin-top: 4px;
}

.co-savings-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 222, 128, .1);
    border: .5px solid rgba(74, 222, 128, .3);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    color: #4ade80;
    margin-top: 10px;
}

.co-savings-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}

.co-features {
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
}

.co-feat {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.4;
}

.co-feat-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.co-rollover {
    background: rgba(59, 130, 246, .1);
    border: .5px solid rgba(59, 130, 246, .25);
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.5;
}

.co-rollover strong {
    color: #60a5fa;
    font-weight: 500;
}

/* ── MAIN ── */
.co-main {
    padding: 2rem 2.5rem 3rem;
    background: #f4f3ef;
}

.co-section-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 12px;
}

/* Payment method selector */
.co-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 2rem;
}

.co-method {
    border: .5px solid #e5e3de;
    border-radius: 10px;
    padding: 12px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    user-select: none;
}

.co-method:hover {
    border-color: #c7c4be;
}

.co-method.is-active {
    border: 1.5px solid #0d0f14;
    box-shadow: 0 0 0 3px rgba(13, 15, 20, .06);
}

.co-method-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 22px;
}

.co-method-label {
    font-size: 11px;
    color: #9ca3af;
}

.co-method.is-active .co-method-label {
    color: #0d0f14;
    font-weight: 500;
}

.cc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .02em;
}

.cc-visa {
    background: #1a1f71;
    color: #fff;
}

.cc-mc {
    background: #eb001b;
    color: #fff;
}

.cc-amex {
    background: #2e77bc;
    color: #fff;
}

/* Form */
.co-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.co-form-grid.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

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

.co-span-2 {
    grid-column: span 2;
}

.co-panel {
    background: #fff;
    border: 1px solid var(--co-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.co-panel .co-section-label {
    margin-bottom: 10px;
}

.co-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.co-field label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: .03em;
}

.co-field input,
.co-field select {
    border: .5px solid #e5e3de;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    background: #fff;
    color: #0d0f14;
    outline: none;
    width: 100%;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
}

.co-field input:focus,
.co-field select:focus {
    border-color: #0d0f14;
    box-shadow: 0 0 0 3px rgba(13, 15, 20, .06);
}

/* Cardnumber icon */
.co-cvv-hint {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.4;
    margin-top: 2px;
}

/* Discount row */
.co-discount-row {
    display: flex;
    gap: 8px;
    margin-bottom: 1.75rem;
}

.co-discount-row input {
    flex: 1;
    border: .5px solid #e5e3de;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    background: #fff;
    color: #0d0f14;
    outline: none;
    transition: border-color .15s;
}

.co-discount-row input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.co-discount-row input:focus {
    border-color: #0d0f14;
}

.co-discount-btn {
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: .04em;
    border: .5px solid #e5e3de;
    border-radius: 8px;
    background: #fff;
    color: #0d0f14;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}

.co-discount-btn:hover {
    background: #f4f3ef;
}

/* Divider */
.co-divider {
    height: .5px;
    background: #e5e3de;
    margin: 1.5rem 0;
}

/* Order summary */
.co-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}


.co-summary-amount {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.co-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #0d0f14;
}

.co-strike {
    text-decoration: line-through;
    color: #c4c2bc;
}

.co-saved-badge {
    font-size: 11px;
    background: #f0fdf4;
    color: #16a34a;
    border: .5px solid #bbf7d0;
    border-radius: 20px;
    padding: 2px 9px;
}

.co-discount-status {
    display: none;
    margin-top: 8px;
    font-size: 12px;
    color: #15803d;
    background: #f0fdf4;
    border: .5px solid #bbf7d0;
    border-radius: 999px;
    padding: 4px 10px;
    width: fit-content;
}

/* Terms */
.co-terms-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 1.25rem;
}

.co-terms-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0d0f14;
    flex-shrink: 0;
    cursor: pointer;
}

.co-terms-row a {
    color: #0d0f14;
}

/* Pay button */
.co-pay-btn {
    width: 100%;
    padding: 14px;
    background: #0d0f14;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s, transform .1s;
}

.co-pay-btn:hover {
    background: #1c2030;
}

.co-pay-btn:active {
    transform: scale(.99);
}

.co-pay-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.co-secure-note {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Crypto section */
.co-crypto-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8f7f3 100%);
    border: 1px solid var(--co-border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(13, 15, 20, .05);
}

.co-crypto-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.co-crypto-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--co-ink);
}

.co-crypto-badge {
    font-size: 11px;
    color: #0f766e;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}

.co-crypto-select {
    position: relative;
}

.co-crypto-select::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #6b7280;
    border-bottom: 1.5px solid #6b7280;
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}

.co-crypto-overlay {
    width: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #6b7280;
    gap: 10px;
    background: var(--co-ice);
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
}

.payment-crypto-details {
    display: none;
    margin-top: 14px;
    border: 1px solid var(--co-border);
    border-radius: 12px;
    background: var(--co-card);
    padding: 14px;
}

.payment-crypto-qrcode img {
    width: 180px;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--co-border);
    background: #fff;
    padding: 6px;
}

/* Paddle section */
.co-paddle-note {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Alert overrides */
.co-alert {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.co-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: .5px solid #bfdbfe;
}

.co-alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: .5px solid #bbf7d0;
}

/* Validation error color */
.terms-error {
    color: #dc2626 !important;
    font-weight: 500;
}

.terms-error a {
    color: #dc2626 !important;
}

@media (max-width: 768px) {
    .checkout-wrap {
        grid-template-columns: 1fr;
    }

    .co-sidebar {
        height: auto;
        position: static;
    }

    .co-main {
        padding: 1.5rem;
    }

    .co-methods {
        grid-template-columns: 1fr;
    }

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

    .co-span-2 {
        grid-column: span 1;
    }

    .co-form-grid.cols-3 {
        grid-template-columns: 1fr 1fr;
    }
}