/**
 * Impox B2B — Frontend v3
 * High-specificity overrides for WooCommerce My Account.
 * Matches the premium app-style mockup.
 */

/* Force light BG on the WC content area */
.woocommerce-account .woocommerce-MyAccount-content {
    background: #f0f4f8 !important;
    padding: 20px 14px !important;
}

/* ── Root scope — every element lives inside .ib3 ── */
.ib3,
.ib3 * { box-sizing: border-box; }

.ib3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Page header ─────────────────────────────────── */
.ib3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 10px;
}

.ib3-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.025em;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.ib3-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 99px;
}

.ib3-back-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.ib3-back-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #0f172a;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.ib3-page-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

/* ── Empty state ────────────────────────────────── */
.ib3-empty {
    text-align: center;
    background: #fff;
    border-radius: 18px;
    padding: 52px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.ib3-empty-icon { font-size: 2.6rem; display: block; margin-bottom: 10px; }
.ib3-empty-msg  { color: #64748b; font-size: .95rem; margin: 0 0 20px; }

/* ── Card list ──────────────────────────────────── */
.ib3-list { display: flex; flex-direction: column; gap: 14px; }

/* ── Card ───────────────────────────────────────── */
.ib3-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.03);
    transition: box-shadow .2s, transform .15s;
}
.ib3-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.11); transform: translateY(-1px); }

/* Card inner padding */
.ib3-card-inner { padding: 16px 18px 4px; }

/* Card top row: product name + status badge */
.ib3-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.ib3-product {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

/* Chips row (type badge + date) */
.ib3-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.ib3-date {
    font-size: .76rem;
    color: #94a3b8;
    font-weight: 500;
}

/* My Orders: qty + updated line */
.ib3-order-info {
    font-size: .83rem;
    color: #475569;
    margin: 0 0 14px;
    line-height: 1.6;
}
.ib3-order-info span { display: block; }

/* Card buttons area */
.ib3-card-btns {
    padding: 0 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ib3-btns-row {
    display: flex;
    gap: 8px;
}
.ib3-btns-row .ib3-btn { flex: 1; }

/* ── Status & type badges ───────────────────────── */
.ib3-badge {
    display: inline-flex;
    align-items: center;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Status */
.ib3-badge--new        { background: #f1f5f9; color: #64748b; }
.ib3-badge--contacted  { background: #fef9c3; color: #713f12; }
.ib3-badge--confirmed  { background: #dcfce7; color: #15803d; }
.ib3-badge--processing { background: #fef3c7; color: #b45309; }
.ib3-badge--shipped    { background: #dbeafe; color: #1d4ed8; }
.ib3-badge--delivered  { background: #d1fae5; color: #065f46; }
.ib3-badge--invoiced   { background: #f3e8ff; color: #7e22ce; }
.ib3-badge--completed  { background: #d1fae5; color: #065f46; }
.ib3-badge--cancelled  { background: #fee2e2; color: #b91c1c; }

/* Type */
.ib3-badge--pricing { background: #2563eb; color: #fff; }
.ib3-badge--sample  { background: #7c3aed; color: #fff; }

/* ── Buttons ────────────────────────────────────── */
.ib3-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: opacity .15s, transform .12s;
    white-space: nowrap;
    width: 100%;
    box-shadow: none !important;
    line-height: 1 !important;
}
.ib3-btn:active { transform: scale(.97); }

/* Track Order blue/rounded */
.ib3-btn--track {
    background: #2563eb;
    color: #fff !important;
    border-radius: 14px;
}
.ib3-btn--track:hover { background: #1d4ed8; color: #fff !important; }

/* Ghost outline */
.ib3-btn--ghost {
    background: #fff !important;
    color: #374151 !important;
    border: 1.5px solid #e2e8f0 !important;
}
.ib3-btn--ghost:hover { background: #f8fafc !important; }

/* Green WhatsApp */
.ib3-btn--wa {
    background: #25d366 !important;
    color: #fff !important;
}
.ib3-btn--wa:hover { background: #22c55e !important; opacity: .95; }

/* Dark Call */
.ib3-btn--call {
    background: #1e293b !important;
    color: #fff !important;
}
.ib3-btn--call:hover { background: #0f172a !important; color: #fff !important; }

/* ── Track Order Page ───────────────────────────── */
.ib3-track-product {
    background: #fff;
    border-radius: 18px;
    padding: 20px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.ib3-track-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.2;
}

.ib3-track-status { margin-bottom: 0; }

/* ── Progress stepper ───────────────────────────── */
.ib3-section {
    background: #fff;
    border-radius: 18px;
    padding: 18px 18px 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.ib3-section-label {
    font-size: .75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 18px;
}

.ib3-stepper {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 0;
    scrollbar-width: none;
}
.ib3-stepper::-webkit-scrollbar { display: none; }

.ib3-step {
    flex: 1;
    min-width: 56px;
    max-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

/* Connector line between steps */
.ib3-step-line {
    position: absolute;
    top: 17px;
    left: calc(50% + 17px);
    right: calc(-50% + 17px);
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}
.ib3-step-line--done { background: #22c55e; }

/* Step dot */
.ib3-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2.5px solid #e2e8f0;
    background: #fff;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 800;
    z-index: 1;
    position: relative;
    margin-bottom: 7px;
    transition: all .25s;
}

.ib3-step--done .ib3-step-dot {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}
.ib3-step--current .ib3-step-dot {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 5px rgba(37,99,235,.15);
}

.ib3-step-label {
    font-size: .61rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.3;
    word-break: break-word;
    max-width: 54px;
}
.ib3-step--done .ib3-step-label { color: #059669; }
.ib3-step--current .ib3-step-label { color: #2563eb; font-weight: 800; }

/* ── Notes box ──────────────────────────────────── */
.ib3-notes {
    font-size: .87rem;
    line-height: 1.65;
    color: #475569;
    white-space: pre-wrap;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 14px;
}

/* ── Detail two-column table (request-detail page) ──────────────── */
.ib3-dtable {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
}

.ib3-dtable-row { border-bottom: 1px solid #f1f5f9; }
.ib3-dtable-row:last-child { border-bottom: none; }
.ib3-dtable-row:nth-child(even) td { background: #fafbfc; }

.ib3-dtable-label {
    width: 38%;
    padding: 11px 12px 11px 0;
    color: #64748b;
    font-weight: 600;
    font-size: .8rem;
    vertical-align: top;
    white-space: nowrap;
}

.ib3-dtable-val {
    width: 62%;
    padding: 11px 0 11px 8px;
    color: #0f172a;
    font-weight: 600;
    vertical-align: top;
    word-break: break-word;
}

.ib3-dtable-msg {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 360px) {
    .ib3-dtable-label { white-space: normal; width: 40%; }
}

/* ── Contact buttons ────────────────────────────── */
.ib3-contacts {
    display: flex;
    gap: 10px;
}
.ib3-contacts .ib3-btn { flex: 1; }
