/*
 * store-checkout.css
 * CareerZoneHub — PDF Store Checkout Page
 * Load via: $extra_css = ['assets/css/store-checkout.css'];
 */

/* ══════════════════════════════════════
   PAGE WRAPPER
══════════════════════════════════════ */
.co-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

@media (min-width: 640px) { .co-page { padding: 32px 20px 60px; } }
@media (min-width: 768px) { .co-page { padding: 40px 0 60px; } }

/* ══════════════════════════════════════
   STEP INDICATOR
══════════════════════════════════════ */
.co-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    background: #fff;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 2px 12px rgba(37,99,235,.1);
    border: 1px solid var(--gray-soft);
}

.co-step {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--gray-light);
    transition: all .25s ease;
    white-space: nowrap;
}

.co-step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gray-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 800;
    flex-shrink: 0;
    transition: all .25s ease;
}

.co-step.is-done { color: var(--secondary); }
.co-step.is-done .co-step-dot {
    background: var(--secondary);
    color: #fff;
}

.co-step.is-active {
    background: var(--primary);
    color: #fff;
}
.co-step.is-active .co-step-dot {
    background: rgba(255,255,255,.25);
    color: #fff;
}

.co-step-line {
    width: 20px;
    height: 2px;
    background: var(--gray-soft);
    flex-shrink: 0;
    transition: background .25s;
}
.co-step-line.is-done { background: var(--secondary); }

@media (max-width: 399px) {
    .co-step { padding: 7px 10px; font-size: .72rem; gap: 5px; }
    .co-step-line { width: 12px; }
}

/* ══════════════════════════════════════
   BASE CARD (shared)
══════════════════════════════════════ */
.co-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--gray-soft);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    animation: coFadeUp .35s ease both;
}

.co-card:nth-child(2) { animation-delay: .06s; }
.co-card:nth-child(3) { animation-delay: .12s; }

@keyframes coFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.co-card-top {
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.co-card-top.green {
    background: linear-gradient(90deg, var(--secondary), var(--secondary-dark));
}

.co-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-soft);
}

.co-card-hicon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
    background: var(--primary-very-soft);
    color: var(--primary);
}

.co-card-htitle {
    font-size: .98rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.co-card-body {
    padding: 18px;
}

@media (min-width: 480px) { .co-card-body { padding: 20px; } }

/* ══════════════════════════════════════
   PRODUCT SUMMARY CARD
══════════════════════════════════════ */
.co-product-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.co-product-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #eef2ff, #ede9fe);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #6366f1;
    flex-shrink: 0;
}

.co-product-info {
    flex: 1;
    min-width: 0;
}

.co-product-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
    margin-bottom: 8px;
}

.co-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.co-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .7rem;
    font-weight: 600;
}

.co-tag-cat   { background: #eef2ff; color: #4f46e5; }
.co-tag-exam  { background: #fef3c7; color: #92400e; }
.co-tag-pages { background: var(--gray-very-soft); color: var(--gray-dark); }

.co-product-price {
    flex-shrink: 0;
    text-align: right;
    padding-left: 8px;
}

.co-price-now {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary-dark);
    line-height: 1;
}

.co-price-was {
    display: block;
    font-size: .75rem;
    color: var(--gray-light);
    text-decoration: line-through;
    margin-top: 2px;
}

.co-price-save {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    color: #ef4444;
    background: #fee2e2;
    padding: 2px 7px;
    border-radius: 50px;
    margin-top: 4px;
}

/* Perks grid */
.co-perks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-soft);
}

.co-perk {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--gray-very-soft);
    border-radius: 10px;
    text-align: center;
    transition: all .2s;
}

.co-perk:hover {
    background: var(--primary-very-soft);
    transform: translateY(-2px);
}

.co-perk-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: #fff;
    flex-shrink: 0;
}

.co-perk-label {
    font-size: .74rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.co-perk-sub {
    font-size: .66rem;
    color: var(--gray-light);
}

/* ══════════════════════════════════════
   CUSTOMER FORM
══════════════════════════════════════ */
.co-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.co-field { display: flex; flex-direction: column; gap: 6px; }

.co-field-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--gray-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.co-field-label i {
    color: var(--primary);
    font-size: .8rem;
    width: 14px;
    text-align: center;
}

.co-field-label .opt {
    font-weight: 400;
    color: var(--gray-light);
    font-size: .75rem;
}

.co-input-wrap { position: relative; }

.co-input-wrap .co-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-light);
    font-size: .85rem;
    pointer-events: none;
    transition: color .2s;
}

.co-input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1.5px solid var(--gray-soft);
    border-radius: 10px;
    font-size: .92rem;
    font-family: inherit;
    color: var(--dark);
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.co-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.09);
}

.co-input:focus + .co-input-icon,
.co-input-wrap:focus-within .co-input-icon {
    color: var(--primary);
}

/* Hint text */
.co-field-hint {
    font-size: .72rem;
    color: var(--gray-light);
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 2px;
}

/* ── Total bar ── */
.co-total {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1.5px solid #86efac;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.co-total-label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--gray-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.co-total-label i { color: var(--secondary-dark); }

.co-total-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-dark);
}

/* ── Pay button ── */
.co-pay-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all .22s ease;
    box-shadow: 0 4px 16px rgba(16,185,129,.3);
    position: relative;
    overflow: hidden;
}

.co-pay-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background .2s;
}

.co-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(16,185,129,.42);
}

.co-pay-btn:hover::after { background: rgba(255,255,255,.06); }

.co-pay-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16,185,129,.3);
}

.co-pay-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.co-pay-btn .co-arrow {
    transition: transform .2s;
    font-size: .9rem;
}

.co-pay-btn:hover .co-arrow { transform: translateX(5px); }

/* ── Security strip ── */
.co-security {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-soft);
    font-size: .74rem;
    color: var(--gray-light);
}

.co-security-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.co-security-item i { font-size: .8rem; }
.co-security-item i.green { color: var(--secondary); }
.co-security-item i.yellow { color: var(--warning); }
.co-security-item i.blue { color: var(--primary); }

/* ── Payment method logos ── */
.co-card-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.co-logo {
    background: var(--gray-very-soft);
    border: 1px solid var(--gray-soft);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .7rem;
    font-weight: 700;
    color: var(--gray-dark);
    letter-spacing: .3px;
}

/* ── Back link ── */
.co-back {
    text-align: center;
    padding: 6px 0 4px;
}

.co-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-light);
    font-size: .82rem;
    text-decoration: none;
    transition: color .2s;
}

.co-back a:hover { color: var(--primary); }

/* ══════════════════════════════════════
   ERROR ALERT (override)
══════════════════════════════════════ */
.co-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fee2e2;
    border-left: 3px solid #ef4444;
    border-radius: 10px;
    padding: 13px 16px;
    margin-bottom: 16px;
    font-size: .88rem;
    color: #991b1b;
    animation: coFadeUp .3s ease;
}

.co-error i { flex-shrink: 0; margin-top: 1px; }

/* ══════════════════════════════════════
   TOAST (override jd-toast)
══════════════════════════════════════ */
.co-toast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--dark);
    color: #fff;
    padding: 11px 22px;
    border-radius: 50px;
    font-size: .86rem;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    white-space: nowrap;
}

.co-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════
   LOADING SPINNER (inside pay button)
══════════════════════════════════════ */
.co-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: coSpin .8s linear infinite;
    flex-shrink: 0;
}

.support-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: #2563eb;
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37,99,235,.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
}
.support-float:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    color: #fff;
}

@keyframes coSpin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   MOBILE TWEAKS
══════════════════════════════════════ */
@media (max-width: 399px) {
    .co-product-row { flex-wrap: wrap; }
    .co-product-price { padding-left: 0; }
    .co-price-now { font-size: 1.2rem; }
    .co-perks { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .co-perk { padding: 10px 4px; }
    .co-perk-label { font-size: .68rem; }
}