/* =========================================================
   KOOTZY — MY ORDERS (list + detail)
   Builds on cart.css; tokens only.
   ========================================================= */

.orders-page { padding: 0 0 2.5rem; }

/* ── list cards ── */
.orders-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.order-card {
    display: block;
    background: var(--bg-panel);
    border: 1.5px solid var(--border-color);
    border-radius: var(--r-md, 14px);
    padding: 0.9rem 1rem;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    transition: var(--transition-smooth);
}
.order-card:hover { border-color: var(--border-color-hover); transform: translateY(-1px); }

.order-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.order-card-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
}
.order-card-date { color: var(--text-muted); font-size: 0.82rem; }

.order-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.order-card-meta { color: var(--text-muted); font-size: 0.88rem; }

/* ── status chip: colour + glyph + text, never colour alone ── */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.7rem 0.25rem 0.3rem;
    border: 1.5px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-panel);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
}
.status-dot {
    width: 20px; height: 20px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.7rem;
    line-height: 20px;
    text-align: center;
    flex: 0 0 auto;
}

/* ── detail ── */
.order-chip { margin: 0.25rem 0 0.4rem; }
.od-note { color: var(--text-muted); margin: 0 0 1.25rem; max-width: 46ch; }

.od-subhead {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
    margin: 1.5rem 0 0.75rem;
}

/* timeline */
.od-timeline {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: grid;
    gap: 0;
}
.od-timeline li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    position: relative;
}
.od-timeline li.done, .od-timeline li.current { color: var(--text-main); }
.od-timeline li.current { font-weight: 700; }
.od-step-dot {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--paper-2);
    border: 1.5px solid var(--border-color-hover);
    color: #fff;
    font-size: 0.7rem;
    line-height: 20px;
    text-align: center;
    flex: 0 0 auto;
}
.od-timeline li.done .od-step-dot,
.od-timeline li.current .od-step-dot { border-color: transparent; }
/* connecting rail */
.od-timeline li + li::before {
    content: "";
    position: absolute;
    left: 10.25px;
    top: -8px;
    width: 1.5px;
    height: 16px;
    background: var(--border-color-hover);
}
.od-timeline-muted { opacity: 0.45; }

.od-meta { margin-top: 1.25rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .od-meta { grid-template-columns: 1fr 1fr; align-items: start; } }

.od-address {
    background: var(--paper-2);
    border: 1.5px solid var(--border-color);
    border-radius: var(--r-md, 14px);
    padding: 0.9rem 1rem;
}
.od-address h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
    color: var(--text-main);
}
.od-address p { margin: 0; color: var(--text-main); font-size: 0.9rem; line-height: 1.5; }
.od-address p + p { margin-top: 0.4rem; font-weight: 700; }

/* ── Google sign-in ── */
.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 48px;
    width: 100%;
    max-width: 320px;
    margin: 0.75rem auto 0;
    padding: 0 1.25rem;
    border-radius: 999px;
    background: #fff;
    color: var(--text-main);
    border: 1.5px solid var(--text-main);
    box-shadow: 2px 2px 0 var(--text-main);
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.google-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--text-main); }
.google-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--text-main); }
.google-btn:disabled { opacity: 0.7; cursor: default; transform: none; }
.google-btn svg { flex: 0 0 auto; }

/* Saved addresses */
.addr-book { margin-top: 2rem; }
.addr-book[hidden], .addr-form[hidden] { display: none; }
.addr-book-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.addr-book-head h2 { font-family: var(--font-display); font-size: 1.25rem; margin: 0; }
.addr-add { width: auto; }
.addr-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.addr-card { border: 1.5px solid var(--text-main); border-radius: 14px; padding: 0.85rem 1rem; background: var(--bg-panel, #fff); }
.addr-card-title { font-weight: 800; display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.addr-card-text { color: var(--text-muted); font-size: 0.88rem; margin: 0.25rem 0 0.6rem; }
.addr-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.addr-card-actions button { border: 1.5px solid var(--text-main); background: transparent; border-radius: 10px; padding: 0.35rem 0.75rem; font-weight: 700; cursor: pointer; }
.addr-card-actions .addr-remove { color: var(--primary-strong, #DB0B21); border-color: var(--primary-strong, #DB0B21); }
.addr-form { border: 1.5px dashed var(--text-main); border-radius: 14px; padding: 1rem; margin-top: 0.8rem; }
.addr-form h3 { margin: 0 0 0.6rem; }
.addr-form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.addr-form-actions .state-btn { width: auto; }
