/* ==========================================================
   B2B Portal – Shared UX Enhancements
   Keeps existing layout & brand colors, improves usability
   ========================================================== */

/* ── Fade-in animation for page content ── */
@keyframes b2b-fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.b2b-animate-in {
    animation: b2b-fadeUp .4s ease-out both;
}

/* ── Step Progress Indicator (Summary & Success) ── */
.b2b-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 2rem 0 1rem;
    max-width: 480px;
    margin: 0 auto;
}

.b2b-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
}

.b2b-step-circle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    background-color: #d0d5dd;
    transition: background-color .3s ease, box-shadow .3s ease;
    position: relative;
    z-index: 2;
}

.b2b-step.active .b2b-step-circle {
    background-color: #00aeef;
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.18);
}

.b2b-step.completed .b2b-step-circle {
    background-color: #00aeef;
}

.b2b-step-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #999;
    font-family: 'Montserrat', Arial, sans-serif;
    text-align: center;
    transition: color .3s ease;
}

.b2b-step.active .b2b-step-label,
.b2b-step.completed .b2b-step-label {
    color: #333;
    font-weight: 600;
}

.b2b-step-line {
    flex: 1;
    height: 2px;
    background: #d0d5dd;
    margin-top: 18px; /* vertically center with circle */
    min-width: 40px;
    transition: background-color .3s ease;
}

.b2b-step-line.done {
    background: #00aeef;
}

@media (min-width: 576px) {
    .b2b-step-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 15px;
    }
    .b2b-step-label {
        font-size: 13px;
    }
    .b2b-step-line {
        margin-top: 20px;
        min-width: 60px;
    }
    .b2b-steps {
        max-width: 520px;
    }
}

/* ── Improved Counter Buttons ── */
.b2b-counter {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 2px;
}

.b2b-counter-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: #00aeef;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .1s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1;
    padding: 0;
}

.b2b-counter-btn:hover {
    background: #00aeef;
    color: #fff;
}

.b2b-counter-btn:active {
    transform: scale(0.92);
}

.b2b-counter-value {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    font-family: 'Montserrat', Arial, sans-serif;
}

@media (max-width: 575.98px) {
    .b2b-counter-btn {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 14px;
    }
    .b2b-counter-value {
        min-width: 22px;
        font-size: 13px;
    }
}

/* ── Cart Item Card ── */
.b2b-cart-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #eee;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.b2b-cart-item:hover {
    border-color: rgba(0, 174, 239, 0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.b2b-cart-item:last-child {
    margin-bottom: 0;
}

/* ── Ticket Row in Cart ── */
.b2b-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    gap: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.b2b-ticket-row:last-child {
    border-bottom: none;
}

.b2b-ticket-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #333;
}

.b2b-ticket-price {
    font-weight: 600;
    font-size: 14px;
    color: #00aeef;
    white-space: nowrap;
    font-family: 'Montserrat', Arial, sans-serif;
}

/* ── Product Card Hover (Listing Page) ── */
.b2b-product-card {
    transition: transform .25s ease, box-shadow .25s ease;
    border-radius: 12px;
    overflow: hidden;
}

.b2b-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.b2b-product-card .card-img-container {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.b2b-product-card .card-img-top {
    transition: transform .4s ease;
}

.b2b-product-card:hover .card-img-top {
    transform: scale(1.04);
}

/* ── Search Input Enhancement ── */
.b2b-search-wrap {
    position: relative;
    max-width: 320px;
}

.b2b-search-wrap .b2b-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
    transition: color .2s ease;
}

.b2b-search-wrap input {
    width: 100%;
    height: 42px;
    border: 1.5px solid #e0e0e0;
    border-radius: 999px;
    padding: 0 16px 0 40px;
    font-size: 14px;
    font-family: 'Open Sans', Arial, sans-serif;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.b2b-search-wrap input::placeholder {
    color: #aaa;
    font-weight: 400;
}

.b2b-search-wrap input:focus {
    border-color: #00aeef;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

.b2b-search-wrap input:focus ~ .b2b-search-icon {
    color: #00aeef;
}

/* ── Summary Sidebar Sticky ── */
@media (min-width: 768px) {
    .b2b-sticky-sidebar {
        position: sticky;
        top: 100px;
    }
}

/* ── Section Heading with subtle left accent ── */
.b2b-section-heading {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #333;
    padding-left: 12px;
    border-left: 3px solid #00aeef;
    margin-bottom: 1.5rem;
}

/* ── CTA Button Pair (primary + outline) ── */
.b2b-cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.b2b-cta-group .customBtn {
    min-width: 180px;
    text-align: center;
}

@media (max-width: 575.98px) {
    .b2b-cta-group {
        flex-direction: column;
    }
    .b2b-cta-group .customBtn {
        width: 100%;
        min-width: 0;
    }
}

/* ── Empty State ── */
.b2b-empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.b2b-empty-state img {
    width: clamp(100px, 20vw, 160px);
    height: auto;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.b2b-empty-state h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.b2b-empty-state p {
    color: #888;
    font-size: 15px;
    margin-bottom: 1.5rem;
}

/* ── Checkout Box (Success Page) ── */
.b2b-checkout-box {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}

.b2b-checkout-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 16px;
}

.b2b-checkout-row:last-child {
    border-bottom: none;
}

.b2b-checkout-label {
    font-weight: 700;
    font-size: 13px;
    color: #00aeef;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 140px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.b2b-checkout-value {
    color: #333;
    font-size: 14px;
    text-align: right;
    flex: 1;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .b2b-checkout-row {
        flex-direction: column;
        gap: 4px;
    }
    .b2b-checkout-label {
        text-align: left;
    }
    .b2b-checkout-value {
        text-align: left;
    }
    .b2b-checkout-box {
        padding: 1.25rem;
    }
}

/* ── Success/Fail Status Badge ── */
.b2b-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.b2b-status-badge.success {
    background: #e6f9ee;
    color: #07b559;
}

.b2b-status-badge.failed {
    background: #fef2f2;
    color: #ef4444;
}

/* ── Subtle page background ── */
.b2b-page-bg {
    background: #f8f9fb;
    min-height: 60vh;
}

/* ── Summary product divider ── */
.b2b-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 12px 0;
}

/* ── Collapse toggle button (Success page) ── */
.b2b-collapse-toggle {
    background: none;
    border: none;
    padding: 0;
    color: #00aeef;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .2s ease;
    font-family: 'Montserrat', Arial, sans-serif;
}

.b2b-collapse-toggle:hover {
    color: #0090c8;
}

.b2b-collapse-toggle i {
    transition: transform .25s ease;
    font-size: 12px;
}

.b2b-collapse-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}
