/**
 * Copyright © Zhik. All rights reserved.
 * My Locations (stockist management) — trade-theme styling. Mirrors the portal
 * order/invoice lists: eyebrow above a .block-card, status pills, and the same
 * mobile record-card treatment (reusing the .portal-history-shell hooks).
 */

/* Intro row: sub-description on the left, "Add New Location" pill on the right. */
.locations-intro-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.locations-intro-row .portal-page-intro__sub { margin: 0; }
.locations-add-btn { white-space: nowrap; }

/* Tabs use the global .portal-tabs / .portal-tab component (theme _extend.less). */

/* List table inside the card — match the portal lists. */
.dealer-locations-card .table-wrapper.dealer-locations { border: 0; margin: 0; }
.dealer-locations-card .data.table { margin: 0; }
.dealer-locations-card .data.table td { vertical-align: middle; }
.dealer-locations-card .data.table td.address { color: #4a4f56; line-height: 1.45; }
.dealer-locations-card .data.table td.name strong { font-weight: 600; }

/* Row actions use the global .portal-action component; just space them. */
.dealer-locations-card .actions-primary { display: inline-flex; gap: 8px; }

.dealer-locations-card .rejection-reason { margin-top: 6px; color: var(--status-danger, #c0392b); }

/* Empty state reuses the portal pattern. */
.dealer-locations-empty { margin-top: 4px; }

/* Per-tab empty — the shared .portal-empty-state, trimmed to sit inside the card. */
.dealer-locations-tab-empty { padding: 28px 16px; }
.dealer-locations-tab-empty .portal-empty-state__icon { font-size: 30px; }

/* ---- Mobile record cards (<=639px): mirror the orders/invoices lists ---- */
@media (max-width: 639px) {
    .dealer-locations-card .table-wrapper.dealer-locations .data.table thead { display: none; }
    .dealer-locations-card .table-wrapper.dealer-locations .data.table tbody > tr {
        display: block;
        margin-bottom: 14px;
        border: 1px solid var(--border-color, #e3e3e3);
        border-radius: var(--radius-control, 8px);
        padding: 4px 14px;
        background: #fff;
    }
    .dealer-locations-card .table-wrapper.dealer-locations .data.table tbody > tr > td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 9px 0;
        border: 0;
        border-bottom: 1px solid #f0f1f2;
        text-align: right;
    }
    .dealer-locations-card .table-wrapper.dealer-locations .data.table tbody > tr > td:last-child { border-bottom: 0; }
    .dealer-locations-card .table-wrapper.dealer-locations .data.table tbody > tr > td::before {
        content: attr(data-th);
        font-weight: 600;
        color: #6a6f76;
        text-align: left;
    }
    .dealer-locations-card .actions-primary { justify-content: flex-end; }
}
