/*
 * CliqPower design tokens.
 *
 * Deliberately restrained: one brand color used with intent, small/consistent
 * radii, borders and whitespace for separation instead of drop-shadows and
 * nested cards, type doing the hierarchy work instead of color or boxes.
 */

:root {
    /* Brand — one color, used with intent */
    --cq-primary: #0a7d2e;
    --cq-primary-dark: #065e22;
    --cq-primary-tint: #f0f7f1;

    /* Ink & surface */
    --cq-bg: #ffffff;
    --cq-surface: #ffffff;
    --cq-surface-sunken: #fafaf9;
    /* "paper" — the warm off-white used for the payment-details card, a shade
       below pure white so it reads as a distinct surface without a shadow. */
    --cq-paper: #f8f7f4;
    /* "pale" — a light green tint for icon badges and subtle fills, distinct
       from --cq-primary-tint only in name (kept for parity with the source
       design's token names). */
    --cq-pale: #eef6f0;
    /* "ink" — near-black, used for the SELECTED state on category tiles and
       the meter-type toggle. Deliberately not green: selection reads as
       "chosen/active" via ink, while green stays reserved for brand/CTA. */
    --cq-ink: #15171a;
    --cq-border: #e4e4e1;
    --cq-border-strong: #d4d4d0;
    --cq-text: #1a1a18;
    --cq-text-muted: #68675f;
    --cq-text-faint: #9a9a92;

    /* Status */
    --cq-success: #0a7d2e;
    --cq-success-bg: #f0f7f1;
    --cq-warning: #92620a;
    --cq-warning-bg: #fbf3e4;
    --cq-danger: #b3261e;
    --cq-danger-bg: #fbeceb;

    /* Shape — flat design: tight, consistent corners, no oversized rounding */
    --cq-radius-sm: 4px;
    --cq-radius-md: 6px;
    --cq-radius-lg: 8px;

    /* Motion */
    --cq-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --cq-fast: 0.12s;
    --cq-base-speed: 0.18s;
    --cq-press: 0.1s;

    /* Type — Space Grotesk for headings/numbers, DM Sans for body/UI text */
    --cq-font-display: 'Space Grotesk', 'DM Sans', sans-serif;
    --cq-font-body: 'DM Sans', sans-serif;

    /* Spacing scale */
    --cq-space-1: 4px;
    --cq-space-2: 8px;
    --cq-space-3: 12px;
    --cq-space-4: 16px;
    --cq-space-5: 24px;
    --cq-space-6: 32px;
    --cq-space-7: 48px;
}

/* main.css defaults every Material Symbols icon to red (unthemed template
   leftover) — reset to inherit so icon color follows its container everywhere. */
.material-symbols-outlined {
    color: inherit;
}

/* Keyboard-visible focus ring, consistent across every interactive cq-* element. */
.cq-btn:focus-visible,
.cq-option:focus-visible,
.cq-chip:focus-visible,
.cq-input:focus-visible,
.cq-segmented button:focus-visible,
.cq-tile:focus-visible,
.cq-provider:focus-visible,
.cq-nav__links a:focus-visible,
.cq-icon-btn:focus-visible {
    outline: 2px solid var(--cq-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Type ---------- */
.cq-h1 {
    font-family: var(--cq-font-display);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--cq-text);
    margin: 0;
}
.cq-h2 {
    font-family: var(--cq-font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--cq-text);
    margin: 0;
}
.cq-eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cq-text-faint);
}

/* ---------- Surface ---------- */
.cq-panel {
    background: var(--cq-surface);
    border: 1px solid var(--cq-border);
    border-radius: var(--cq-radius-lg);
}

/* ---------- Buttons ---------- */
/* Flat: solid fill, no shadow/gradient. Animated: a 1px lift on hover and a
   quick scale-down on press give it weight without reaching for a shadow. */
.cq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--cq-radius-md);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color var(--cq-fast) var(--cq-ease), border-color var(--cq-fast) var(--cq-ease), color var(--cq-fast) var(--cq-ease), transform var(--cq-fast) var(--cq-ease);
}
.cq-btn--primary {
    background: var(--cq-primary);
    color: #fff;
}
.cq-btn--primary:hover {
    background: var(--cq-primary-dark);
    transform: translateY(-1px);
}
.cq-btn--primary:active {
    background: var(--cq-primary-dark);
    transform: translateY(0) scale(0.97);
    transition-duration: var(--cq-press);
}
.cq-btn--ghost {
    background: transparent;
    color: var(--cq-text);
    border-color: var(--cq-border-strong);
}
.cq-btn--ghost:hover {
    border-color: var(--cq-text);
    background: var(--cq-surface-sunken);
}
.cq-btn--ghost:active {
    transform: scale(0.97);
    transition-duration: var(--cq-press);
}
.cq-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- Status pills ---------- */
.cq-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--cq-radius-sm);
    font-size: 11px;
    font-weight: 600;
}
.cq-pill--success { background: var(--cq-success-bg); color: var(--cq-success); }
.cq-pill--warning { background: var(--cq-warning-bg); color: var(--cq-warning); }
.cq-pill--danger { background: var(--cq-danger-bg); color: var(--cq-danger); }

/* ---------- Product row (list, not a wall of colorful cards) ---------- */
.cq-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--cq-border);
    border-radius: var(--cq-radius-md);
    background: var(--cq-surface);
    cursor: pointer;
    text-align: left;
    transition: border-color var(--cq-fast) var(--cq-ease), background-color var(--cq-fast) var(--cq-ease), transform var(--cq-fast) var(--cq-ease);
}
.cq-option:hover {
    border-color: var(--cq-border-strong);
    background: var(--cq-surface-sunken);
    transform: translateX(2px);
}
.cq-option:active {
    transform: translateX(2px) scale(0.99);
    transition-duration: var(--cq-press);
}
.cq-option.is-selected {
    border-color: var(--cq-primary);
    background: var(--cq-primary-tint);
}
.cq-option__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--cq-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cq-surface-sunken);
    color: var(--cq-text);
    flex-shrink: 0;
    transition: background-color var(--cq-fast) var(--cq-ease), color var(--cq-fast) var(--cq-ease);
}
.cq-option.is-selected .cq-option__icon {
    background: var(--cq-primary);
    color: #fff;
}
.cq-option__icon i { font-size: 20px; }
.cq-option__label {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--cq-text);
}
.cq-option__sub {
    font-size: 12.5px;
    color: var(--cq-text-faint);
    margin-top: 1px;
}
.cq-option:disabled,
.cq-option[disabled] {
    cursor: not-allowed;
    color: var(--cq-text-faint);
}
.cq-option:disabled:hover { background: var(--cq-surface); border-color: var(--cq-border); transform: none; }

/* The Naira sign (U+20A6) renders with a broken, overlapping double bar
   across the next digit on Windows/Chrome — in every font tested, in every
   weight, regardless of alignment, margin, pseudo-element, unicode-bidi, or
   DOM structure tried. The one constant across every reproduction: it only
   glitches when the glyph is the first rendered character of its line box;
   real preceding text avoids it, but an amount value legitimately starts
   with the currency marker. Given no reliable CSS-only fix exists, amounts
   use the plain text "NGN" prefix instead of the Unicode glyph — standard
   practice in Nigerian fintech UI for exactly this cross-platform risk. */
.cq-naira {
    font-weight: 500;
    color: var(--cq-text-muted);
    margin-right: 3px;
}

/* ---------- Key/value list (summaries, receipts) ---------- */
.cq-kv {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--cq-border);
    font-size: 13.5px;
}
.cq-kv:last-child { border-bottom: none; }
.cq-kv__k { color: var(--cq-text-faint); }
.cq-kv__v { color: var(--cq-text); font-weight: 600; text-align: right; }

/* ---------- Form fields ---------- */
.cq-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--cq-text);
    margin: var(--cq-space-4) 0 var(--cq-space-2);
}
.cq-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14.5px;
    font-family: var(--cq-font-body);
    color: var(--cq-text);
    border: 1px solid var(--cq-border-strong);
    border-radius: var(--cq-radius-md);
    box-sizing: border-box;
    background: var(--cq-surface);
    transition: border-color var(--cq-fast) var(--cq-ease);
}
.cq-input:focus {
    outline: none;
    border-color: var(--cq-primary);
}
.cq-input::placeholder { color: var(--cq-text-faint); }

.cq-segmented {
    display: inline-flex;
    border: 1px solid var(--cq-border-strong);
    border-radius: var(--cq-radius-md);
    overflow: hidden;
}
.cq-segmented button {
    border: none;
    background: var(--cq-surface);
    padding: 9px 18px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    color: var(--cq-text-muted);
    border-right: 1px solid var(--cq-border-strong);
    transition: background-color var(--cq-fast) var(--cq-ease), color var(--cq-fast) var(--cq-ease), transform var(--cq-fast) var(--cq-ease);
    text-transform: capitalize;
}
.cq-segmented button:last-child { border-right: none; }
.cq-segmented button.is-active {
    background: var(--cq-ink);
    color: #fff;
}
.cq-segmented button:active {
    transform: scale(0.96);
    transition-duration: var(--cq-press);
}

/* ---------- Skeleton / shimmer loading ---------- */
.cq-skeleton {
    position: relative;
    overflow: hidden;
    background: var(--cq-surface-sunken);
    border-radius: var(--cq-radius-sm);
}
.cq-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);
    animation: cq-shimmer 1.3s infinite;
}
@keyframes cq-shimmer {
    100% { transform: translateX(100%); }
}

/* ---------- Step transitions ---------- */
.cq-step-enter {
    animation: cq-fade-slide-in var(--cq-base-speed) var(--cq-ease) both;
}
@keyframes cq-fade-slide-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Spinner ---------- */
.cq-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    animation: cq-spin 0.7s linear infinite;
}
@keyframes cq-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Top nav ---------- */
.cq-nav {
    border-bottom: 1px solid var(--cq-border);
    background: var(--cq-surface);
}
.cq-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 74px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cq-nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cq-nav__mark {
    width: 32px;
    height: 32px;
    border-radius: var(--cq-radius-md);
    background: var(--cq-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cq-nav__mark i { font-size: 18px; }
.cq-nav__word {
    font-family: var(--cq-font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--cq-text);
}
.cq-nav__word span { color: var(--cq-primary); }
.cq-nav__links {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 13px;
    font-weight: 500;
}
.cq-nav__links a {
    color: var(--cq-text-muted);
    transition: color var(--cq-fast) var(--cq-ease);
}
.cq-nav__links a:hover,
.cq-nav__links a.is-active {
    color: var(--cq-primary);
}
.cq-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--cq-radius-md);
    border: 1px solid var(--cq-border-strong);
    background: var(--cq-surface);
    color: var(--cq-text);
    cursor: pointer;
}
@media (max-width: 991px) {
    .cq-nav__links { display: none; }
}

/* ---------- Numbered section header ("01 Choose a category") ---------- */
.cq-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.cq-step-head__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--cq-text-muted);
}
.cq-step-head__label .num {
    color: var(--cq-primary);
    margin-right: 10px;
}
.cq-step-head__meta {
    font-size: 12px;
    color: var(--cq-text-muted);
}

/* ---------- Category tiles ---------- */
.cq-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.cq-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 76px;
    padding: 8px 4px;
    border: 1px solid var(--cq-border);
    border-radius: var(--cq-radius-md);
    background: var(--cq-paper);
    color: var(--cq-text);
    cursor: pointer;
    transition: border-color var(--cq-fast) var(--cq-ease), background-color var(--cq-fast) var(--cq-ease), color var(--cq-fast) var(--cq-ease), transform var(--cq-fast) var(--cq-ease);
}
.cq-tile i { font-size: 18px; }
.cq-tile span {
    font-size: 10px;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cq-tile:hover {
    transform: translateY(-2px);
    border-color: var(--cq-primary);
    background: var(--cq-pale);
}
.cq-tile.is-selected {
    border-color: var(--cq-ink);
    background: var(--cq-ink);
    color: #fff;
}
.cq-tile:disabled {
    cursor: not-allowed;
    color: var(--cq-text-faint);
}
.cq-tile:disabled:hover {
    transform: none;
    border-color: var(--cq-border);
    background: var(--cq-paper);
}

/* ---------- Provider grid ---------- */
.cq-providers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.cq-provider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 64px;
    padding: 8px 12px;
    border: 1px solid var(--cq-border);
    border-radius: var(--cq-radius-md);
    background: var(--cq-paper);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--cq-fast) var(--cq-ease), background-color var(--cq-fast) var(--cq-ease), transform var(--cq-fast) var(--cq-ease);
}
.cq-provider:hover {
    border-color: rgba(10, 125, 46, 0.3);
    background: var(--cq-pale);
    transform: translateY(-1px);
}
.cq-provider.is-selected {
    border-color: rgba(10, 125, 46, 0.4);
    background: var(--cq-pale);
}
.cq-provider__name {
    font-family: var(--cq-font-display);
    font-size: 12px;
    font-weight: 500;
    color: var(--cq-text);
    line-height: 1.3;
}
.cq-provider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--cq-border-strong);
    background: var(--cq-surface);
    flex-shrink: 0;
}
.cq-provider.is-selected .cq-provider__dot {
    border-color: var(--cq-primary);
    background: var(--cq-primary);
}

/* ---------- Receipt card (payment details) ---------- */
.cq-receipt {
    position: relative;
    border: 1px solid var(--cq-border);
    border-radius: var(--cq-radius-lg);
    background: var(--cq-paper);
    padding: 36px;
}
.cq-receipt__divider {
    margin: 28px 0;
    border-top: 1px dashed var(--cq-border-strong);
}
.cq-receipt__badge {
    width: 44px;
    height: 44px;
    border-radius: var(--cq-radius-md);
    background: var(--cq-pale);
    color: var(--cq-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cq-receipt__badge i { font-size: 21px; }
