﻿/* ==========================================================================
   THUNDER HOST â€” VISITOR THEME â€” ORDER FLOW, WIZARD & STEPS
   ========================================================================== */

/* Product picker rows (used on /order) */
body.th-visitor-body.th-page-order {
    background-color: #f5faf8;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(16, 185, 129, .10), transparent 28rem),
        radial-gradient(circle at 88% 34%, rgba(245, 158, 11, .07), transparent 24rem),
        linear-gradient(rgba(15, 23, 42, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .025) 1px, transparent 1px);
    background-size: auto, auto, 42px 42px, 42px 42px;
}
body.th-visitor-body.th-page-order .th-page-header {
    background: linear-gradient(180deg, rgba(245, 250, 248, .92), rgba(255, 255, 255, .28));
}
body.th-visitor-body.th-page-order .th-section {
    background: transparent;
}

.th-page-order .th-pricing-card {
    background: #fff !important;
    border: 1px solid rgba(15, 23, 42, .09) !important;
    border-radius: var(--th-radius) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06) !important;
    color: var(--th-ink) !important;
    min-height: 180px;
    padding: 1.5rem !important;
    font-smoothing: antialiased;
    -webkit-font-smoothing: antialiased;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.th-page-order .th-pricing-card:hover {
    border-color: rgba(5, 150, 105, .32) !important;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .11) !important;
    transform: translateY(-3px);
}
.th-page-order .th-pricing-card p {
    color: var(--th-muted);
}
.th-page-order .th-category-count {
    padding: .4rem .6rem;
    border-radius: 999px;
    background: rgba(5, 150, 105, .09);
    color: var(--th-primary-dark);
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}
.th-page-order .th-category-action {
    color: var(--th-primary-dark);
    font-weight: 700;
}

.th-pricing-card {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 1.75rem;
    min-height: 180px;
    font-smooth: always;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all .25s ease;
}
.th-pricing-card:hover { box-shadow: var(--th-shadow); }
.th-product-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--th-border);
    color: var(--th-ink);
    text-decoration: none;
    transition: background .15s ease;
}
.th-product-row:last-child { border-bottom: 0; }
.th-product-row:hover { background: rgba(5, 150, 105, .04); padding-left: .5rem; padding-right: .5rem; }
.th-product-main { flex: 1; min-width: 0; }
.th-product-main strong { display: block; color: var(--th-ink); font-size: 1.02rem; font-weight: 700; margin-bottom: .15rem; }
.th-product-main small { color: var(--th-muted); font-size: .85rem; }
.th-product-meta { display: flex; align-items: center; gap: 1.25rem; }
.th-product-price { font-weight: 800; color: var(--th-primary-dark); white-space: nowrap; }
.th-product-action {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .45rem 1rem;
    background: rgba(5, 150, 105, .08);
    color: var(--th-primary-dark);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}
.th-product-row:hover .th-product-action { background: var(--th-primary); color: #fff; }
@media (max-width: 575.98px) {
    .th-product-row { flex-direction: column; align-items: flex-start; gap: .75rem; }
    .th-product-meta { width: 100%; justify-content: space-between; }
}

/* Stepper / progress wizard */
.th-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 2rem auto 3rem;
    max-width: 720px;
}
.th-stepper .th-step {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1rem;
    color: var(--th-muted);
    font-size: .9rem;
    font-weight: 600;
    position: relative;
}
.th-stepper .th-step .num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--th-soft-2);
    color: var(--th-muted);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: .9rem;
    flex-shrink: 0;
}
.th-stepper .th-step.active .num { background: var(--th-primary); color: #fff; box-shadow: 0 4px 12px rgba(5, 150, 105, .25); }
.th-stepper .th-step.active { color: var(--th-ink); }
.th-stepper .th-step.done .num { background: var(--th-success); color: #fff; }
.th-stepper .th-step-sep { width: 32px; height: 2px; background: var(--th-border); }
.th-stepper .th-step.done + .th-step-sep { background: var(--th-success); }
@media (max-width: 575.98px) {
    .th-stepper .th-step-sep { width: 14px; }
    .th-stepper .th-step { padding: .35rem .5rem; font-size: .8rem; }
    .th-stepper .th-step span:not(.num) { display: none; }
}

/* Configure form layout */
.th-config-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 991.98px) { .th-config-grid { grid-template-columns: 1fr; } }
.th-config-card {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.th-config-card h3 { font-size: 1.15rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.th-config-card h3 svg { width: 22px; height: 22px; color: var(--th-primary); }
.th-config-card .form-label { font-weight: 600; font-size: .92rem; }
.th-config-card .form-control, .th-config-card .form-select { padding: .7rem 1rem; border-radius: var(--th-radius-sm); border: 1.5px solid var(--th-border); }
.th-config-card .form-control:focus, .th-config-card .form-select:focus { border-color: var(--th-primary); box-shadow: 0 0 0 4px rgba(5, 150, 105, .12); }

/* Domain option cards (register new / transfer / existing / none) */
.th-domain-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 575.98px) { .th-domain-options { grid-template-columns: 1fr; } }
.th-domain-option {
    position: relative;
    background: #fff;
    border: 2px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all .2s ease;
}
.th-domain-option:hover { border-color: rgba(5, 150, 105, .4); }
.th-domain-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.th-domain-option.selected { border-color: var(--th-primary); background: rgba(5, 150, 105, .04); box-shadow: 0 0 0 3px rgba(5, 150, 105, .15); }
.th-domain-option .ic {
    width: 40px; height: 40px;
    background: rgba(5, 150, 105, .1);
    color: var(--th-primary);
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: .75rem;
}
.th-domain-option .ic svg { width: 20px; height: 20px; }
.th-domain-option strong { display: block; color: var(--th-ink); font-size: 1rem; margin-bottom: .25rem; }
.th-domain-option small { color: var(--th-muted); font-size: .82rem; }

.th-domain-panel { display: none; }
.th-domain-panel.active { display: block; }

/* Period selector cards */
.th-period-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; }
.th-period-option {
    position: relative;
    border: 2px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
    background: #fff;
}
.th-period-option:hover { border-color: rgba(5, 150, 105, .4); }
.th-period-option.selected { border-color: var(--th-primary); background: rgba(5, 150, 105, .04); }
.th-period-option input { position: absolute; opacity: 0; pointer-events: none; }
.th-period-option strong { display: block; color: var(--th-ink); font-size: .95rem; font-weight: 700; margin-bottom: .25rem; }
.th-period-option small { color: var(--th-muted); font-size: .78rem; }
.th-period-option .badge { position: absolute; top: -.5rem; right: -.5rem; background: var(--th-accent); color: #fff; padding: .15rem .5rem; border-radius: 999px; font-size: .68rem; font-weight: 700; }

/* Order summary (sticky sidebar) */
.th-order-summary {
    position: sticky;
    top: 100px;
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 1.75rem;
}
.th-order-summary h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.th-order-summary .os-line { display: flex; justify-content: space-between; padding: .5rem 0; font-size: .9rem; }
.th-order-summary .os-line.muted { color: var(--th-muted); }
.th-order-summary .os-line.subtotal { border-top: 1px solid var(--th-border); margin-top: .5rem; padding-top: .75rem; font-weight: 700; }
.th-order-summary .os-line.total { font-size: 1.1rem; font-weight: 800; color: var(--th-ink); }
.th-order-summary .os-divider { border-top: 1px solid var(--th-border); margin: 1rem 0; }
.th-order-summary .os-product { padding: .75rem 0; border-bottom: 1px solid var(--th-border); }
.th-order-summary .os-product:last-child { border-bottom: 0; }
.th-order-summary .os-product strong { display: block; font-size: .92rem; }
.th-order-summary .os-product small { color: var(--th-muted); font-size: .78rem; }

/* Addons list */
.th-addon { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--th-border); border-radius: var(--th-radius-sm); margin-bottom: .5rem; }
.th-addon.selected { background: rgba(5, 150, 105, .04); border-color: var(--th-primary); }
.th-addon input { width: 18px; height: 18px; }
.th-addon .addon-info { flex: 1; }
.th-addon .addon-info strong { display: block; color: var(--th-ink); font-size: .9rem; }
.th-addon .addon-info small { color: var(--th-muted); font-size: .78rem; }
.th-addon .addon-price { font-weight: 700; color: var(--th-primary-dark); }

/* Promo / summary additions */
.th-promo-form {
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: .5rem;
    margin: 1rem 0;
}
.th-promo-form input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--th-border);
    border-radius: var(--th-radius-sm);
}
.th-promo-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    flex: 0 0 96px;
    width: 96px;
    height: 42px;
    padding: .65rem .5rem;
    background: var(--th-ink);
    color: #fff;
    border: 0;
    border-radius: var(--th-radius-sm);
    font-weight: 700;
    cursor: pointer;
}
.th-promo-form button .th-loader {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    border-color: rgba(255, 255, 255, .35);
    border-top-color: var(--th-primary-light);
}
@media (max-width: 380px) {
    .th-promo-form { flex-direction: column; }
    .th-promo-form button { flex-basis: 42px; width: 100%; }
}

/* Empty state */
.th-empty-state { text-align: center; padding: 4rem 1rem; }
.th-empty-state svg { width: 64px; height: 64px; color: var(--th-muted); margin-bottom: 1rem; }
.th-empty-state h3 { margin-bottom: .5rem; }
.th-empty-state p { color: var(--th-muted); margin-bottom: 1.5rem; }


/* ── Cart item cards ── */
.th-cart-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    flex-wrap: wrap;
}
.th-cart-item--sep { border-top: 1px solid var(--th-border); }
.th-cart-item-main { flex: 1 1 0; min-width: 0; }
.th-cart-item-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.th-cart-item-title strong { font-size: .97rem; color: var(--th-ink); }
.th-cart-item-type {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--th-primary-dark);
    background: rgba(5, 150, 105, .1);
    padding: .15rem .5rem;
    border-radius: 999px;
}
.th-cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;
    flex-shrink: 0;
}
.th-cart-item-price { font-weight: 800; font-size: 1.05rem; color: var(--th-ink); white-space: nowrap; }
.th-btn-ghost {
    background: transparent;
    border: 1px solid var(--th-border);
    color: var(--th-muted);
    font-size: .78rem;
    padding: .3rem .65rem;
    border-radius: var(--th-radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: border-color .15s, color .15s;
}
.th-btn-ghost:hover { border-color: var(--th-danger); color: var(--th-danger); }

/* Period pills */
.th-cart-periods { display: flex; flex-wrap: wrap; gap: .35rem; }
.th-period-pill {
    padding: .3rem .75rem;
    border: 1.5px solid var(--th-border);
    border-radius: 999px;
    background: #fff;
    font-size: .78rem;
    font-weight: 600;
    color: var(--th-muted);
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}
.th-period-pill:hover { border-color: var(--th-primary); color: var(--th-primary-dark); }
.th-period-pill.active { border-color: var(--th-primary); background: rgba(5, 150, 105, .08); color: var(--th-primary-dark); }

/* Domain confirmed card (read-only, cart step 3) */
.th-domain-confirmed {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    background: rgba(5, 150, 105, .04);
    border: 1.5px solid rgba(5, 150, 105, .25);
    border-radius: var(--th-radius-sm);
    flex-wrap: nowrap;
    overflow: hidden;
}
.th-domain-confirmed-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
}
.th-domain-confirmed-body { flex: 1 1 0; min-width: 0; overflow: hidden; }
.th-domain-confirmed-label { display: block; font-size: .72rem; font-weight: 700; color: var(--th-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-domain-confirmed-name { display: block; font-size: 1rem; font-weight: 800; color: var(--th-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Domain result badges (search) */
.th-domain-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem 1rem;
    border-radius: var(--th-radius-sm);
    border: 1.5px solid var(--th-border);
    flex-wrap: wrap;
}
.th-domain-result.available { border-color: var(--th-success); background: rgba(16, 185, 129, .05); }
.th-domain-result.unavailable { border-color: var(--th-danger); background: rgba(239, 68, 68, .04); }
.th-domain-result-name { font-weight: 700; font-size: .95rem; word-break: break-all; }
.th-domain-badge { font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.th-domain-badge.ok { background: rgba(16, 185, 129, .15); color: #065f46; }
.th-domain-badge.no { background: rgba(239, 68, 68, .12); color: #b91c1c; }

/* Upsell grid — 3 per row */
.th-upsell-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .85rem;
}
@media (max-width: 991.98px) { .th-upsell-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px)  { .th-upsell-grid { grid-template-columns: 1fr; } }

.th-upsell-card {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    transition: border-color .2s, box-shadow .2s;
}
.th-upsell-card:hover { border-color: rgba(5, 150, 105, .35); box-shadow: 0 4px 16px rgba(5, 150, 105, .08); }
.th-upsell-info { flex: 1; }
.th-upsell-info strong { display: block; font-size: .92rem; color: var(--th-ink); margin-bottom: .2rem; }
.th-upsell-info small { color: var(--th-muted); font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th-upsell-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; }
.th-upsell-price { font-weight: 800; color: var(--th-primary-dark); font-size: .9rem; white-space: nowrap; }

/* CTA buttons in order summary — stacked, never overlapping */
.th-cart-cta-wrap { display: flex; flex-direction: column; gap: .6rem; }
.th-cart-cta-wrap .th-btn { width: 100%; justify-content: center; }
.th-btn-outline {
    background: transparent;
    border: 2px solid var(--th-primary);
    color: var(--th-primary-dark);
    font-weight: 700;
}
.th-btn-outline:hover { background: rgba(5, 150, 105, .06); }

/* Mobile */
@media (max-width: 575.98px) {
    .th-cart-item { flex-direction: column; }
    .th-cart-item-right { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
    .th-domain-confirmed { flex-wrap: wrap; gap: .6rem; }
    .th-domain-confirmed-icon { width: 32px; height: 32px; }
    .th-domain-confirmed-body { flex: 1 1 calc(100% - 48px); }
    .th-domain-confirmed .th-domain-badge { margin-left: 0; flex-basis: 100%; justify-content: flex-start; }
}
