/* =========================================================
   Primo Paints — customer account (details, orders, addresses)
   Extends primo.css / primo-cart.css / primo-checkout.css.
   ========================================================= */

/* ---------- Nav ---------- */
.nav-account { transition: color .2s; }
.nav-account:hover { color: var(--brand); }
.main-nav .nav-orders { font-size: .92rem; }

/* ---------- Account header ---------- */
.acct-head {
    display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 28px; margin-bottom: 26px;
}
.acct-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.acct-avatar {
    width: 60px; height: 60px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
    font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.5rem;
    box-shadow: var(--shadow-brand);
}
.acct-id h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 3px; }
.acct-id p { color: var(--muted); font-size: .9rem; word-break: break-word; }
.acct-trade {
    display: inline-block; margin-top: 8px;
    font-family: 'Sora', sans-serif; font-size: .72rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--accent); background: rgba(230, 57, 70, .1);
    padding: 5px 12px; border-radius: 100px;
}
.acct-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.acct-stats dt { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.acct-stats dd { font-family: 'Sora', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--ink); }

/* ---------- Tabs ---------- */
.acct-tabs {
    display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 26px;
    border-bottom: 1px solid var(--line);
}
.acct-tab {
    position: relative; padding: 13px 20px;
    font-family: 'Sora', sans-serif; font-weight: 600; font-size: .93rem; color: var(--ink-soft);
    border-radius: 12px 12px 0 0; transition: color .2s, background .2s;
}
.acct-tab:hover { color: var(--brand); background: var(--bg-soft); }
.acct-tab.is-active { color: var(--brand); }
.acct-tab.is-active::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px;
    background: var(--brand); border-radius: 3px 3px 0 0;
}
.acct-tab--out { margin-left: auto; color: var(--muted); }
.acct-tab--out:hover { color: var(--accent); background: rgba(230, 57, 70, .06); }

/* ---------- Panels ---------- */
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.acct-panel {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.acct-panel h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.acct-panel-sub { color: var(--ink-soft); font-size: .89rem; margin-bottom: 22px; }
.acct-panel .field { margin-bottom: 18px; }
.acct-panel label {
    display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px;
}
.acct-panel input[type="text"],
.acct-panel input[type="email"],
.acct-panel input[type="tel"],
.acct-panel input[type="password"] {
    width: 100%; font: inherit; font-size: .94rem; color: var(--ink);
    padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.acct-panel input:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(27, 60, 140, .1);
}
.acct-panel .field.has-error input { border-color: var(--accent); }
.acct-panel .field-error { display: block; font-size: .78rem; color: var(--accent); margin-top: 6px; }
.acct-panel .field-hint { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.acct-panel .btn { width: 100%; justify-content: center; margin-top: 4px; }
.acct-note { margin-top: 20px; font-size: .86rem; color: var(--ink-soft); text-align: center; }
.acct-note a { color: var(--brand); font-weight: 600; }
.acct-back { margin-bottom: 18px; }

/* ---------- Order list ---------- */
.order-list { display: grid; gap: 12px; }
.order-row {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
    transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.order-row:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-2px); }
.order-row-main { min-width: 0; }
.order-row-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.order-row-top strong { font-family: 'Sora', sans-serif; font-size: 1rem; color: var(--ink); }
.order-row-items {
    color: var(--ink-soft); font-size: .9rem; margin-bottom: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-row-meta { color: var(--muted); font-size: .82rem; }
.order-row-side { display: flex; align-items: center; gap: 14px; flex: none; }
.order-row-total { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--brand); }
.order-row-go { color: var(--muted); display: grid; place-items: center; transition: transform .25s var(--ease), color .2s; }
.order-row:hover .order-row-go { transform: translateX(4px); color: var(--brand); }

/* ---------- Status badge ---------- */
.order-status {
    font-family: 'Sora', sans-serif; font-weight: 700; font-size: .7rem;
    letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
    padding: 5px 12px; border-radius: 100px;
    color: var(--ink-soft); background: var(--bg-soft);
}
.order-status--pending { color: #8a6d1f; background: rgba(240, 169, 59, .18); }
.order-status--processing { color: var(--brand); background: var(--brand-light); }
.order-status--shipped { color: #0f6f8f; background: rgba(24, 176, 176, .16); }
.order-status--delivered { color: #1d7a51; background: rgba(47, 163, 107, .16); }
.order-status--cancelled { color: var(--accent-dark); background: rgba(230, 57, 70, .12); }

/* ---------- Order detail ---------- */
.order-detail-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
    flex-wrap: wrap; margin-bottom: 10px;
}
.order-detail-head h2 { font-size: 1.3rem; font-weight: 800; }
.order-detail-head p { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.order-status-hint { color: var(--ink-soft); font-size: .93rem; margin-bottom: 26px; }

/* Progress track */
.order-track {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0;
    list-style: none; margin: 0 0 34px; padding: 0;
}
.order-track li { position: relative; text-align: center; padding-top: 26px; }
.order-track li::before {
    content: ""; position: absolute; top: 8px; left: 0; right: 50%; height: 3px; background: var(--line);
}
.order-track li::after {
    content: ""; position: absolute; top: 8px; left: 50%; right: 0; height: 3px; background: var(--line);
}
.order-track li:first-child::before, .order-track li:last-child::after { display: none; }
.order-track li.is-done::before, .order-track li.is-done::after { background: var(--brand); }
.order-track li.is-current::after { background: var(--line); }
.order-track .dot {
    position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
    width: 15px; height: 15px; border-radius: 50%; background: #fff;
    border: 3px solid var(--line); z-index: 1; transition: border-color .3s, background .3s;
}
.order-track li.is-done .dot { border-color: var(--brand); background: var(--brand); }
.order-track li.is-current .dot { box-shadow: 0 0 0 5px rgba(27, 60, 140, .14); }
.order-track .lbl { font-size: .78rem; color: var(--muted); }
.order-track li.is-done .lbl { color: var(--ink); font-weight: 600; }

/* Timeline */
.order-timeline { list-style: none; display: grid; gap: 14px; margin: 0; padding: 0; }
.order-timeline li {
    position: relative; padding-left: 20px; font-size: .88rem; line-height: 1.45;
}
.order-timeline li::before {
    content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--brand-light); border: 2px solid var(--brand);
}
.order-timeline strong { display: block; font-family: 'Sora', sans-serif; font-size: .9rem; color: var(--ink); }
.order-timeline span { color: var(--muted); font-size: .8rem; }

/* Static address cards in the account (no radio) */
.address-card.is-static { cursor: default; padding-left: 20px; }
.address-card.is-static::before { display: none; }
.address-card.is-static:hover { border-color: var(--line); background: #fff; }
.acct-address-list .address-tools { padding-left: 20px; padding-bottom: 0; }
.acct-address-list .address-card { margin-bottom: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .acct-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .acct-head { padding: 22px 20px; gap: 20px; }
    .acct-stats { gap: 22px; width: 100%; }
    .acct-stats dd { font-size: 1.1rem; }
    .acct-panel { padding: 22px 18px; }
    .acct-tabs { gap: 0; }
    .acct-tab { padding: 12px 14px; font-size: .87rem; }
    .acct-tab--out { margin-left: 0; }

    .order-row { padding: 18px; align-items: flex-start; flex-direction: column; gap: 12px; }
    .order-row-side { width: 100%; justify-content: space-between; }
    .order-row-items { white-space: normal; }

    /* The horizontal track becomes a vertical list on phones. */
    .order-track { grid-auto-flow: row; gap: 0; }
    .order-track li { text-align: left; padding: 0 0 20px 30px; }
    .order-track li::before, .order-track li::after { display: none; }
    .order-track li:not(:last-child) { border-left: 3px solid var(--line); margin-left: 6px; }
    .order-track li.is-done:not(:last-child) { border-left-color: var(--brand); }
    .order-track .dot { top: 0; left: -4px; transform: none; }
    .order-track li:not(:last-child) .dot { left: -9px; }
    .order-track .lbl { font-size: .85rem; }
}
