/* Moje konto → zamówienia + szczegóły (preset sklepu: vv-admin_theme → store)
   Scope: .woocommerce-MyAccount-content — działa niezależnie od klasy body
   (klasyczny My Account, OceanWP, Elementor / shortcode itd.). */

.woocommerce-MyAccount-content .woocommerce-orders-table,
.woocommerce-MyAccount-content .woocommerce-order-details,
.woocommerce-MyAccount-content .woocommerce-customer-details {
    --vv-ca-orders-radius: var(--vv-harmony-radius, var(--vv-ca-radius, 16px));
    --vv-ca-orders-radius-sm: var(--vv-harmony-radius-sm, calc(var(--vv-ca-orders-radius) * 0.6));
    --vv-ca-orders-border: var(--vvfs-border, var(--vv-ca-border, rgba(0, 0, 0, 0.1)));
    --vv-ca-orders-surface: var(--vvfs-bg, var(--vv-ca-card-bg, #fff));
    --vv-ca-orders-surface-alt: color-mix(in srgb, var(--vv-ca-orders-text, #0f172a) 6%, var(--vv-ca-orders-surface));
    --vv-ca-orders-text: var(--vvfs-text, var(--vv-ca-text, inherit));
    --vv-ca-orders-dim: var(--vvfs-text-dim, var(--vv-ca-text-dim, #64748b));
    --vv-ca-orders-accent: var(--vv-harmony-primary-bg, var(--vv-ca-accent, #111827));
    font-family: var(--vvfs-font, inherit);
}

/* ===== Lista zamówień ===== */
@media (min-width: 769px) {
    body.vv-customer-account .woocommerce-MyAccount-content:has(.woocommerce-orders-table),
    .woocommerce-MyAccount-content:has(.woocommerce-orders-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.woocommerce-MyAccount-content .woocommerce-orders-table {
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

@media (min-width: 769px) {
    .woocommerce-MyAccount-content .woocommerce-orders-table {
        min-width: 720px;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table thead tr {
        box-shadow: 0 6px 18px color-mix(in srgb, var(--vv-ca-orders-text) 8%, transparent);
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table thead th:first-child {
        border-radius: var(--vv-ca-orders-radius-sm) 0 0 var(--vv-ca-orders-radius-sm);
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table thead th:last-child {
        border-radius: 0 var(--vv-ca-orders-radius-sm) var(--vv-ca-orders-radius-sm) 0;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr {
        box-shadow: 0 6px 18px color-mix(in srgb, var(--vv-ca-orders-text) 7%, transparent);
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:nth-child(odd) th,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:nth-child(odd) td {
        background: var(--vv-ca-orders-surface);
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:nth-child(even) th,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:nth-child(even) td {
        background: var(--vv-ca-orders-surface-alt);
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr th:first-child,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr td:first-child {
        border-left: 3px solid color-mix(in srgb, var(--vv-ca-orders-accent) 50%, transparent);
        border-radius: var(--vv-ca-orders-radius-sm) 0 0 var(--vv-ca-orders-radius-sm);
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr th:last-child,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr td:last-child {
        border-radius: 0 var(--vv-ca-orders-radius-sm) var(--vv-ca-orders-radius-sm) 0;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody th,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody td {
        border-top: 1px solid var(--vv-ca-orders-border);
        border-bottom: 1px solid var(--vv-ca-orders-border);
        border-right: 1px solid color-mix(in srgb, var(--vv-ca-orders-border) 88%, transparent);
    }
}

.woocommerce-MyAccount-content .woocommerce-orders-table thead th {
    padding: 14px !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vv-ca-orders-text) !important;
    /* Tło wyraźnie odróżnialne na jasnym i ciemnym presecie: powierzchnia zabarwiona
       akcentem (np. złoto na ciemnym), bez krzykliwego, litego paska. */
    background: color-mix(in srgb, var(--vv-ca-orders-accent) 16%, var(--vv-ca-orders-surface)) !important;
    border-bottom: 2px solid color-mix(in srgb, var(--vv-ca-orders-accent) 60%, transparent) !important;
    vertical-align: middle;
}

/* Motyw potrafi nadpisać kolor na samym <span> w nagłówku — wymuszamy dziedziczenie. */
.woocommerce-MyAccount-content .woocommerce-orders-table thead th,
.woocommerce-MyAccount-content .woocommerce-orders-table thead th .nobr,
.woocommerce-MyAccount-content .woocommerce-orders-table thead th span {
    color: var(--vv-ca-orders-text) !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table thead th .nobr {
    white-space: nowrap;
}

.woocommerce-MyAccount-content .woocommerce-orders-table tbody th,
.woocommerce-MyAccount-content .woocommerce-orders-table tbody td {
    padding: 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--vv-ca-orders-border) 85%, transparent);
    vertical-align: middle;
    color: var(--vv-ca-orders-text);
    font-size: 14px;
    line-height: 1.45;
}

.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:last-child th,
.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:last-child td {
    border-bottom: 1px solid color-mix(in srgb, var(--vv-ca-orders-border) 85%, transparent);
}

@media (min-width: 769px) {
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:last-child th,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:last-child td {
        border-bottom: 1px solid var(--vv-ca-orders-border);
    }
}

.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:hover th,
.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:hover td {
    background: color-mix(in srgb, var(--vv-ca-orders-accent) 8%, var(--vv-ca-orders-surface)) !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-number a {
    font-weight: 800;
    color: var(--vv-ca-orders-accent);
    text-decoration: none;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-number a:hover {
    text-decoration: underline;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-date time {
    color: var(--vv-ca-orders-dim);
    font-size: 13px;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-total {
    font-weight: 700;
    max-width: 11rem;
    word-break: break-word;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-status {
    max-width: 9rem;
    word-break: break-word;
    font-size: 12px;
    font-weight: 700;
}

/* Akcje — wiele przycisków (Płacić, Pogląd, Anulować, Zwrot / Reklamacja) */
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions {
    text-align: right;
    white-space: normal;
    vertical-align: top;
    line-height: 1.5;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button,
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 6px 6px 0 !important;
    padding: 7px 12px !important;
    min-height: 0 !important;
    max-width: 100%;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-decoration: none !important;
    border-radius: var(--vv-ca-orders-radius-sm) !important;
    box-shadow: none !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button:last-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button:last-child {
    margin-right: 0 !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-total .woocommerce-Price-amount {
    color: var(--vv-ca-orders-text);
}

/* Symbol waluty „zł” dziedziczy kolor kwoty (motyw potrafi go nadpisać statycznym kolorem). */
.woocommerce-MyAccount-content .woocommerce-Price-amount,
.woocommerce-MyAccount-content .woocommerce-Price-amount bdi,
.woocommerce-MyAccount-content .woocommerce-Price-currencySymbol {
    color: inherit !important;
}

/* Status — kolor wg klasy wiersza WooCommerce */
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status {
    color: color-mix(in srgb, var(--vv-harmony-accent, #2563eb) 88%, var(--vv-ca-orders-text));
}

.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status {
    color: #16a34a;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status {
    color: #d97706;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-refunded .woocommerce-orders-table__cell-order-status {
    color: #64748b;
}

/* Pasek statusu po lewej — każde zamówienie osobno (desktop: pierwsza komórka, mobile: karta) */
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-processing th:first-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-processing td:first-child {
    border-left-color: color-mix(in srgb, var(--vv-harmony-accent, #2563eb) 72%, transparent) !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-completed th:first-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-completed td:first-child {
    border-left-color: color-mix(in srgb, #16a34a 72%, transparent) !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-on-hold th:first-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-on-hold td:first-child {
    border-left-color: color-mix(in srgb, #d97706 72%, transparent) !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-cancelled th:first-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-cancelled td:first-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-failed th:first-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-failed td:first-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-refunded th:first-child,
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-refunded td:first-child {
    border-left-color: color-mix(in srgb, var(--vv-ca-orders-dim) 85%, transparent) !important;
}

@media (max-width: 768px) {
    .woocommerce-MyAccount-content .woocommerce-orders-table__row--status-processing {
        border-left-color: color-mix(in srgb, var(--vv-harmony-accent, #2563eb) 72%, transparent) !important;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table__row--status-completed {
        border-left-color: color-mix(in srgb, #16a34a 72%, transparent) !important;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table__row--status-on-hold {
        border-left-color: color-mix(in srgb, #d97706 72%, transparent) !important;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table__row--status-cancelled,
    .woocommerce-MyAccount-content .woocommerce-orders-table__row--status-failed,
    .woocommerce-MyAccount-content .woocommerce-orders-table__row--status-refunded {
        border-left-color: color-mix(in srgb, var(--vv-ca-orders-dim) 85%, transparent) !important;
    }
}

/* Pogląd — outline */
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.view {
    background: var(--vv-harmony-listing-cat-buy-bg, #fff) !important;
    color: var(--vv-harmony-listing-cat-buy-text, var(--vv-ca-orders-accent)) !important;
    border: 2px solid var(--vv-harmony-listing-cat-buy-text, var(--vv-ca-orders-accent)) !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.view:hover {
    background: color-mix(in srgb, var(--vv-harmony-listing-cat-buy-text, var(--vv-ca-orders-accent)) 8%, var(--vv-harmony-listing-cat-buy-bg, #fff)) !important;
}

/* Zwrot / Reklamacja — primary */
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.vv_rma {
    background: var(--vv-harmony-listing-cat-add-bg, var(--vv-ca-orders-accent)) !important;
    color: var(--vv-harmony-listing-cat-add-text, var(--vv-harmony-primary-text, #fff)) !important;
    border: 2px solid var(--vv-harmony-listing-cat-add-bg, var(--vv-ca-orders-accent)) !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.vv_rma:hover {
    background: var(--vv-harmony-accent, var(--vv-ca-orders-accent)) !important;
    border-color: var(--vv-harmony-accent, var(--vv-ca-orders-accent)) !important;
    color: var(--vv-harmony-primary-text, #fff) !important;
}

/* Anuluj (WooCommerce + VinVic) */
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.cancel,
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.vv_cancel {
    background: transparent !important;
    color: #ef4444 !important;
    border: 1px solid color-mix(in srgb, #ef4444 45%, transparent) !important;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.cancel:hover,
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.vv_cancel:hover {
    background: color-mix(in srgb, #ef4444 10%, transparent) !important;
    border-color: #ef4444 !important;
}

/* Pay */
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button.pay {
    background: var(--vv-harmony-primary-bg, #111827) !important;
    color: var(--vv-harmony-primary-text, #fff) !important;
    border: 2px solid var(--vv-harmony-primary-bg, #111827) !important;
}

/* Paginacja */
.woocommerce-MyAccount-content .woocommerce-pagination {
    margin-top: 16px;
    text-align: center;
}

.woocommerce-MyAccount-content .woocommerce-pagination .button,
.woocommerce-MyAccount-content .woocommerce-pagination a.button,
.woocommerce-MyAccount-content .woocommerce-pagination .woocommerce-Button,
.woocommerce-MyAccount-content .woocommerce-pagination a.woocommerce-Button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 9px 18px !important;
    min-height: 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    text-decoration: none !important;
    border-radius: var(--vv-ca-orders-radius-sm, 10px) !important;
    background: var(--vv-harmony-primary-bg, var(--vv-ca-orders-accent)) !important;
    color: var(--vv-harmony-primary-text, #fff) !important;
    border: none !important;
    box-shadow: none !important;
}

.woocommerce-MyAccount-content .woocommerce-pagination .button:hover,
.woocommerce-MyAccount-content .woocommerce-pagination a.button:hover,
.woocommerce-MyAccount-content .woocommerce-pagination a.woocommerce-Button:hover {
    background: var(--vv-harmony-accent, var(--vv-ca-orders-accent)) !important;
    color: var(--vv-harmony-primary-text, #fff) !important;
}

/* ===== Widok zamówienia (Szczegóły) ===== */
.woocommerce-MyAccount-content .woocommerce-order-details,
.woocommerce-MyAccount-content .woocommerce-customer-details {
    --vv-ca-od-radius: var(--vv-ca-orders-radius);
    --vv-ca-od-radius-sm: var(--vv-ca-orders-radius-sm);
    --vv-ca-od-border: var(--vv-ca-orders-border);
    --vv-ca-od-surface: var(--vv-ca-orders-surface);
    --vv-ca-od-text: var(--vv-ca-orders-text);
    --vv-ca-od-dim: var(--vv-ca-orders-dim);
    --vv-ca-od-accent: var(--vv-ca-orders-accent);
}

/* Wstęp „Zamówienie nr … jest obecnie …” */
.woocommerce-MyAccount-content > p:first-of-type {
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid var(--vvfs-border, var(--vv-ca-border, rgba(0, 0, 0, 0.1)));
    border-radius: var(--vv-harmony-radius, var(--vv-ca-radius, 16px));
    background: color-mix(in srgb, var(--vv-harmony-primary-bg, var(--vv-ca-accent, #111827)) 5%, var(--vvfs-bg, #fff));
    font-size: 14px;
    line-height: 1.55;
}

.woocommerce-MyAccount-content mark.order-number,
.woocommerce-MyAccount-content mark.order-date,
.woocommerce-MyAccount-content mark.order-status {
    background: transparent;
    color: var(--vv-harmony-primary-bg, var(--vv-ca-accent, #111827));
    font-weight: 800;
}

.woocommerce-MyAccount-content .woocommerce-order-details__title,
.woocommerce-MyAccount-content .woocommerce-column__title {
    font-size: clamp(18px, 2.4vw, 22px);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
}

.woocommerce-MyAccount-content .woocommerce-customer-details {
    margin-top: 28px;
}

/* Tabela szczegółów */
.woocommerce-MyAccount-content .woocommerce-table--order-details,
.woocommerce-MyAccount-content table.order_details {
    width: 100%;
    margin: 0 0 8px;
    border: 1px solid var(--vv-ca-od-border);
    border-radius: var(--vv-ca-od-radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: var(--vv-ca-od-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.woocommerce-MyAccount-content .woocommerce-table--order-details thead th {
    padding: 13px 16px !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--vv-ca-od-text) !important;
    background: color-mix(in srgb, var(--vv-ca-od-accent) 16%, var(--vv-ca-od-surface)) !important;
    border-bottom: 2px solid color-mix(in srgb, var(--vv-ca-od-accent) 60%, transparent) !important;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details tbody td,
.woocommerce-MyAccount-content .woocommerce-table--order-details tbody th {
    padding: 14px 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--vv-ca-od-border) 80%, transparent);
    vertical-align: top;
    color: var(--vv-ca-od-text);
    font-size: 14px;
    line-height: 1.45;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details tbody td.product-total,
.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot td {
    text-align: right;
    white-space: nowrap;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot th,
.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot td {
    padding: 10px 16px;
    font-size: 13px;
    border-top: 1px solid color-mix(in srgb, var(--vv-ca-od-border) 70%, transparent);
    color: var(--vv-ca-od-text);
}

.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot th {
    text-align: right;
    font-weight: 700;
    color: var(--vv-ca-od-dim);
}

.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot tr:last-child td {
    font-size: 15px;
    font-weight: 900;
    color: var(--vv-ca-od-text);
}

/* Ochrona kolorów przed motywem (OceanWP nadpisuje th/td na .shop_table) —
   wszystkie teksty tabeli szczegółów z presetu, czytelne na jasnym i ciemnym. */
.woocommerce-MyAccount-content .woocommerce-table--order-details thead th,
.woocommerce-MyAccount-content .woocommerce-table--order-details thead th span {
    color: var(--vv-ca-od-text) !important;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details tbody th,
.woocommerce-MyAccount-content .woocommerce-table--order-details tbody td,
.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot td {
    color: var(--vv-ca-od-text) !important;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot th {
    color: var(--vv-ca-od-dim) !important;
}

/* Wiersz „Akcje:” w stopce — etykieta + przycisk zwrotu/reklamacji */
.woocommerce-MyAccount-content .woocommerce-table--order-details tfoot th.order-actions--heading {
    color: var(--vv-ca-od-text) !important;
    font-weight: 800;
    vertical-align: middle;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details .order-actions-button,
.woocommerce-MyAccount-content .woocommerce-table--order-details td .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px !important;
    min-height: 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    text-decoration: none !important;
    border: none !important;
    border-radius: var(--vv-ca-od-radius-sm, 10px) !important;
    background: var(--vv-harmony-primary-bg, var(--vv-ca-od-accent)) !important;
    color: var(--vv-harmony-primary-text, #fff) !important;
    box-shadow: none !important;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details .order-actions-button:hover,
.woocommerce-MyAccount-content .woocommerce-table--order-details td .button:hover {
    background: var(--vv-harmony-accent, var(--vv-ca-od-accent)) !important;
    color: var(--vv-harmony-primary-text, #fff) !important;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details .product-name > a {
    font-weight: 700;
    color: var(--vv-ca-od-text);
    text-decoration: none;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details .product-name > a:hover {
    color: var(--vv-ca-od-accent);
    text-decoration: underline;
}

.woocommerce-MyAccount-content .woocommerce-table--order-details .product-quantity {
    color: var(--vv-ca-od-dim);
    font-weight: 700;
}

/* Pozycja z miniaturą + kodami */
.woocommerce-MyAccount-content .vv-order-item-rich {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.woocommerce-MyAccount-content .vv-order-item-rich__thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--vv-ca-od-radius-sm);
    border: 1px solid var(--vv-ca-od-border);
}

.woocommerce-MyAccount-content .vv-order-item-rich__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.woocommerce-MyAccount-content .vv-order-item-rich__name a {
    font-weight: 700;
    color: var(--vv-ca-od-text);
    text-decoration: none;
    line-height: 1.35;
}

.woocommerce-MyAccount-content .vv-order-item-rich__name a:hover {
    color: var(--vv-ca-od-accent);
    text-decoration: underline;
}

.woocommerce-MyAccount-content .vv-order-item-rich__codes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--vv-ca-od-dim);
}

.woocommerce-MyAccount-content .vv-order-item-rich__code strong {
    font-weight: 800;
    color: color-mix(in srgb, var(--vv-ca-od-text) 80%, var(--vv-ca-od-dim));
}

.woocommerce-MyAccount-content .vv-order-item-rich__badges {
    margin-top: 2px;
}

/* Adres klienta */
.woocommerce-MyAccount-content .woocommerce-customer-details address {
    padding: 16px 18px;
    border: 1px solid var(--vv-ca-od-border);
    border-radius: var(--vv-ca-od-radius);
    background: var(--vv-ca-od-surface);
    font-style: normal;
    line-height: 1.6;
    color: var(--vv-ca-od-text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.woocommerce-MyAccount-content .woocommerce-customer-details--phone,
.woocommerce-MyAccount-content .woocommerce-customer-details--email {
    margin: 6px 0 0;
    color: var(--vv-ca-od-dim);
    font-size: 13px;
}

/* ===== Mobile — karty z etykietami data-title ===== */
@media (max-width: 768px) {
    body.vv-customer-account .woocommerce-MyAccount-content:has(.woocommerce-orders-table),
    .woocommerce-MyAccount-content:has(.woocommerce-orders-table) {
        overflow-x: visible;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table {
        min-width: 0 !important;
        width: 100% !important;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table thead {
        display: none;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody {
        display: block;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr {
        display: block;
        margin-bottom: 14px;
        padding: 0;
        border: 1px solid var(--vv-ca-orders-border);
        border-left: 3px solid color-mix(in srgb, var(--vv-ca-orders-accent) 50%, transparent);
        border-radius: var(--vv-ca-orders-radius-sm);
        background: var(--vv-ca-orders-surface);
        overflow: hidden;
        box-shadow: 0 6px 18px color-mix(in srgb, var(--vv-ca-orders-text) 7%, transparent);
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:nth-child(even) {
        background: var(--vv-ca-orders-surface-alt);
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr th:first-child,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr td:first-child {
        border-left: none;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody th,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody td {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px 14px !important;
        border-bottom: 1px solid color-mix(in srgb, var(--vv-ca-orders-border) 80%, transparent);
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr td:last-child,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody tr th:last-child {
        border-bottom: none;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table tbody td::before,
    .woocommerce-MyAccount-content .woocommerce-orders-table tbody th::before {
        content: attr(data-title);
        font-weight: 800;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--vv-ca-orders-dim);
        text-align: left;
        max-width: none;
        width: 100%;
        margin: 0;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
        font-size: 16px;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-total {
        max-width: none;
        font-size: 14px;
        line-height: 1.5;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-status {
        max-width: none;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding-top: 14px !important;
        background: color-mix(in srgb, var(--vv-ca-orders-accent) 4%, var(--vv-ca-orders-surface));
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions::before {
        grid-column: 1 / -1;
        margin-bottom: 2px;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button,
    .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .woocommerce-button {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 11px 14px !important;
        font-size: 12px !important;
        justify-content: center;
        box-sizing: border-box;
    }

    .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button.vv_rma {
        order: -1;
    }

    .woocommerce-MyAccount-content .vv-order-item-rich__thumb {
        width: 48px;
        height: 48px;
    }
}
