/*
 * The customer's own order list, and the guest order tracker.
 *
 * Token-based like the policy pages, because the storefront redefines
 * every one of these under [data-theme="dark"] - the older account pages
 * hardcode #8b4513 and white panels and look wrong there.
 */

.acct-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.acct-page h1 {
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.acct-page .acct-sub {
    color: var(--text-light);
    margin: 0 0 2rem;
}

/* ---- one order ------------------------------------------------------- */

.acct-order {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px var(--shadow);
}

.acct-order-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.acct-order-num {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

.acct-order-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.acct-order-total {
    margin-left: auto;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}

/* The status pill. Three tones only - in hand, waiting, and stopped -
   because a shopper does not need our seven workflow states colour-coded,
   they need to know whether anything is wrong. */
.acct-status {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.acct-status.ok   { background: rgba(31, 122, 61, 0.12);  color: #1f7a3d; }
.acct-status.wait { background: rgba(176, 124, 20, 0.14); color: #8a5f10; }
.acct-status.off  { background: rgba(179, 38, 30, 0.10);  color: #b3261e; }

[data-theme="dark"] .acct-status.ok   { background: rgba(94, 200, 130, 0.16); color: #7fd79f; }
[data-theme="dark"] .acct-status.wait { background: rgba(230, 180, 70, 0.16);  color: #e3b964; }
[data-theme="dark"] .acct-status.off  { background: rgba(240, 110, 100, 0.16); color: #f08a80; }

.acct-order-note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.8rem 0 0;
}

/* ---- the lines ------------------------------------------------------- */

.acct-lines {
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.acct-lines li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem 0;
    color: var(--text-dark);
    font-size: 0.94rem;
}

.acct-lines img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    flex: none;
    background: var(--secondary);
}

.acct-lines .ln-meta {
    color: var(--text-light);
    font-size: 0.85rem;
}

.acct-lines .ln-qty {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.88rem;
    white-space: nowrap;
}

/* ---- tracking and actions -------------------------------------------- */

.acct-track {
    margin-top: 0.9rem;
    padding: 0.75rem 0.9rem;
    background: var(--hover-bg);
    border-radius: 8px;
    font-size: 0.92rem;
    color: var(--text-dark);
}

.acct-track a { color: var(--primary); }

.acct-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.acct-actions a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.acct-actions a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--hover-bg);
}

/* ---- empty state ----------------------------------------------------- */

.acct-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.acct-empty p {
    color: var(--text-light);
    margin: 0 0 1.2rem;
}

/* ---- the guest tracker form ------------------------------------------ */

.acct-form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow);
    margin-bottom: 1.5rem;
}

.acct-form label {
    display: block;
    color: var(--text-dark);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.acct-form input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background);
    color: var(--text-dark);
    font-size: 1rem;
    box-sizing: border-box;
}

.acct-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.acct-form button {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 50px;
    background: var(--primary);
    color: var(--surface);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.acct-note {
    color: var(--text-light);
    font-size: 0.88rem;
    margin: 0;
}

.acct-alert {
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    background: rgba(179, 38, 30, 0.08);
    color: #b3261e;
    border: 1px solid rgba(179, 38, 30, 0.2);
}

[data-theme="dark"] .acct-alert { color: #f08a80; }

@media (max-width: 576px) {
    .acct-page { padding: 1rem 0 3rem; }
    .acct-order { padding: 1rem; }
    .acct-order-total { margin-left: 0; width: 100%; }
}
