/* ==========================================================================
   Fluent Cart — purchase-history page, shared (light + dark)
   Plugin: Fluent Cart Account Portal by ICT Shift (v1.3.7)

   The /account/purchase-history/ endpoint renders the Element Plus order
   table. Fluent Cart delivers its own Element Plus styles in
   customer-profile.css (plus Vue-injected <style> tags) AFTER this sheet,
   with chains at least as specific (`.fluent-cart-customer-profile-app
   .el-table__body td`), so the table rules in dashboard.css (bare `td` /
   `th`) lose and the stock light values survive: white table body,
   #2F3448 cell text, #303133 pagination, mid-gray date token. This sheet
   re-declares the same properties along the full chain (three classes +
   element chain) with !important where FC pins the stock value
   (cell text, header band, cell borders, order link, select/input boxes),
   so it wins regardless of stylesheet order, and maps every color to the
   --fcpa-* portal roles (→ Astra palette, dark-safe). FC deliberately
   disables the Element Plus row hover (transparent !important), so no
   hover rule is added.
   The status badges keep Fluent Cart's inline payment-status colors —
   same policy as the receipt banner in receipt.css.
   purchase-history-dark-mode.css carries the values that differ in the
   dark scheme only.
   ========================================================================== */

/* Table body: FC's .el-table paints itself white although
   dashboard.css already frames the .fct-customer-dashboard-table
   wrapper. Map the surface to the portal background role (white in
   light, dark card in dark — the wrapper's slot-6 border keeps it
   outlined on the dark page). */
.fcpa-active .fct-customer-purchase-history .el-table {
    background-color: var(--fcpa-bg, var(--ast-global-color-5));
}

/* Header cells along the full FC chain (beats `... .el-table thead th`).
   Surface role = pale-cyan tint in light, dark slate in dark. */
.fcpa-active .fct-customer-purchase-history .el-table thead th {
    background-color: var(--fcpa-surface, var(--ast-global-color-4)) !important;
    color: var(--fcpa-text, var(--ast-global-color-2)) !important;
    font-weight: 600;
    border-bottom: 1px solid var(--fcpa-border, var(--ast-global-color-6)) !important;
}

/* Body cells along the full chain (beats `... .el-table__body td`).
   Muted role: #364151 in light (≈ FC's #2F3448), #E7F6FF in dark. */
.fcpa-active .fct-customer-purchase-history .el-table__body td {
    color: var(--fcpa-muted, var(--ast-global-color-3)) !important;
    border-bottom: 1px solid var(--fcpa-border, var(--ast-global-color-6)) !important;
}

/* Order number: keep FC's scheme-aware link color (dark navy in light,
   white in dark) and add the site-blue hover/focus. */
.fcpa-active .fct-customer-purchase-history .invoice-id-date a:hover,
.fcpa-active .fct-customer-purchase-history .invoice-id-date a:focus-visible {
    color: var(--fcpa-accent, var(--ast-global-color-1)) !important;
    text-decoration: underline;
}

/* Date under the order number (FC's mid-gray token) → muted role. */
.fcpa-active .fct-customer-purchase-history .invoice-id-date span.text {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

/* ------------------------------------------------------------------ */
/* Pagination                                                          */
/* ------------------------------------------------------------------ */
.fcpa-active .fct-customer-purchase-history .el-pagination {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

.fcpa-active .fct-customer-purchase-history .el-pagination .el-pager li {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

.fcpa-active .fct-customer-purchase-history .el-pagination .el-pager li:hover {
    color: var(--fcpa-accent, var(--ast-global-color-1));
}

.fcpa-active .fct-customer-purchase-history .el-pagination .el-pager li.is-active {
    background-color: var(--fcpa-accent, var(--ast-global-color-1));
    color: var(--fcpa-accent-text, var(--ast-global-color-5));
}

.fcpa-active .fct-customer-purchase-history .el-pagination button {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

.fcpa-active .fct-customer-purchase-history .el-pagination button:hover:not(:disabled) {
    background-color: var(--fcpa-surface, var(--ast-global-color-4));
    color: var(--fcpa-text, var(--ast-global-color-2));
}

/* The "10 / page" select: Element Plus input chrome redrawn in the
   portal roles (light: white box + slot-6 border ≈ FC's defaults). */
.fcpa-active .fct-customer-purchase-history .el-pagination .el-select__wrapper {
    background-color: var(--fcpa-bg, var(--ast-global-color-5)) !important;
    box-shadow: 0 0 0 1px var(--fcpa-border, var(--ast-global-color-6)) inset !important;
}

.fcpa-active .fct-customer-purchase-history .el-pagination .el-select__selection,
.fcpa-active .fct-customer-purchase-history .el-pagination .el-select__selection span {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

.fcpa-active .fct-customer-purchase-history .el-pagination .el-select__suffix {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

/* ------------------------------------------------------------------ */
/* Expanded search input (Element Plus light box from FC)              */
/* ------------------------------------------------------------------ */
.fcpa-active .fct-customer-purchase-history .fct-collapsible-search-wrap .el-input__wrapper {
    background-color: var(--fcpa-bg, var(--ast-global-color-5)) !important;
    box-shadow: 0 0 0 1px var(--fcpa-border, var(--ast-global-color-6)) inset !important;
}

.fcpa-active .fct-customer-purchase-history .fct-collapsible-search-wrap .el-input__inner {
    color: var(--fcpa-text, var(--ast-global-color-2));
}

.fcpa-active .fct-customer-purchase-history .fct-collapsible-search-wrap .el-input__inner::placeholder {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

/* ------------------------------------------------------------------ */
/* Empty state ("No purchases yet" / search with no hits)              */
/* ------------------------------------------------------------------ */
.fcpa-active .fct-customer-purchase-history .fct-customer-dashboard-empty-state {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

.fcpa-active .fct-customer-purchase-history .fct-empty-icon-box {
    background-color: var(--fcpa-surface, var(--ast-global-color-4));
    color: var(--fcpa-muted, var(--ast-global-color-3));
}

/* ------------------------------------------------------------------ */
/* Mobile order card (≤806px replaces the table row)                   */
/* ------------------------------------------------------------------ */
.fcpa-active .fct-customer-purchase-history .order-content-only-mobile {
    background-color: var(--fcpa-bg, var(--ast-global-color-5));
    color: var(--fcpa-text, var(--ast-global-color-2));
    border-color: var(--fcpa-border, var(--ast-global-color-6));
}

.fcpa-active .fct-customer-purchase-history .order-content-only-mobile .item-header {
    color: var(--fcpa-text, var(--ast-global-color-2));
}

.fcpa-active .fct-customer-purchase-history .order-content-only-mobile .item-footer {
    color: var(--fcpa-muted, var(--ast-global-color-3));
}
