/* ================================================================
   Root container
   ================================================================ */
.wiz-item-history-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    font-family: var(--font-family, inherit);
    color: #111827;
}

.wiz-item-history-mobile.is-loading {
    pointer-events: none;
}

.wiz-item-history-mobile.is-loading .wiz-item-history-mobile__pagination {
    opacity: 0.45;
}

/* ================================================================
   Skeleton cards (pagination loading)
   ================================================================ */
.wiz-item-history-mobile__skeleton-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    background: #fff;
    overflow: hidden;
}

.wiz-item-history-mobile__skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
}

.wiz-item-history-mobile__skeleton-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wiz-item-history-mobile__skeleton-image {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 2px;
}

.wiz-item-history-mobile__skeleton-lines {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.wiz-item-history-mobile__skeleton-aside {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wiz-item-history-mobile__skeleton-pricing {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.wiz-item-history-mobile__skeleton-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 40%;
}

.wiz-item-history-mobile__skeleton-metric--right {
    align-items: flex-end;
    margin-left: auto;
}

.wiz-item-history-mobile__skeleton-bone {
    display: block;
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: wiz-item-history-mobile-shimmer 1.2s ease-in-out infinite;
    border-radius: 2px;
}

.wiz-item-history-mobile__skeleton-bone--title {
    width: 72%;
    height: 14px;
}

.wiz-item-history-mobile__skeleton-bone--meta {
    width: 48%;
    height: 12px;
}

.wiz-item-history-mobile__skeleton-bone--qty-label {
    width: 28px;
    height: 12px;
}

.wiz-item-history-mobile__skeleton-bone--qty {
    width: 40px;
    height: 28px;
}

.wiz-item-history-mobile__skeleton-bone--label {
    width: 64px;
    height: 11px;
}

.wiz-item-history-mobile__skeleton-bone--price {
    width: 72px;
    height: 16px;
}

.wiz-item-history-mobile__skeleton-bone--status {
    width: 100%;
    height: 36px;
    border-radius: 4px;
}

@keyframes wiz-item-history-mobile-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .wiz-item-history-mobile__skeleton-bone {
        animation: none;
        background: #f0f0f0;
    }
}

/* ================================================================
   Record count label  (e.g. "Showing 1–100 of 227 records")
   ================================================================ */
.wiz-item-history-mobile__total {
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
    padding: 0 2px;
}

/* ================================================================
   Card list
   ================================================================ */
.wiz-item-history-mobile__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ================================================================
   Card — image + identity + Qty · pricing · submitted · View Details
   ================================================================ */
.wiz-item-history-mobile__card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.wiz-item-history-mobile__card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    background: #fff;
}

/* ── Card header (image + identity + Qty + actions) ─────────── */
.wiz-item-history-mobile__card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wiz-item-history-mobile__card-header-content {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

.wiz-item-history-mobile__card-header-aside {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-left: auto;
}

.wiz-item-history-mobile__header-row {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.wiz-item-history-mobile__header-label {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 400;
}

.wiz-item-history-mobile__header-value {
    color: #111827;
}

/* SKU value only (no "SKU:" prefix) */
.wiz-item-history-mobile__header-row--sku .wiz-item-history-mobile__header-value {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

/* Product name */
.wiz-item-history-mobile__header-row--title .wiz-item-history-mobile__header-value {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wiz-item-history-mobile__header-row--title {
    white-space: normal;
}

/* Order number / other meta */
.wiz-item-history-mobile__header-row--meta .wiz-item-history-mobile__header-value {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
}

/* ── Qty chip (top-right, before ⋮) ─────────────────────────── */
.wiz-item-history-mobile__qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-top: 2px;
}

.wiz-item-history-mobile__qty-label {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
}

.wiz-item-history-mobile__qty-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1;
    box-sizing: border-box;
}

/* ── Unit Price · Total Price row ───────────────────────────── */
.wiz-item-history-mobile__pricing {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.wiz-item-history-mobile__metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wiz-item-history-mobile__metric--total {
    text-align: right;
    margin-left: auto;
}

.wiz-item-history-mobile__metric-label {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    line-height: 1.3;
}

.wiz-item-history-mobile__metric-value {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

/* ── Submitted date status bar ──────────────────────────────── */
.wiz-item-history-mobile__status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #e8f4fc;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.35;
}

.wiz-item-history-mobile__status-label {
    color: #111827;
    font-weight: 400;
}

.wiz-item-history-mobile__status-value {
    color: #111827;
    font-weight: 500;
    text-align: right;
}

/* ── Product image ──────────────────────────────────────────── */
.wiz-item-history-mobile__image-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wiz-item-history-mobile__image-btn {
    display: block;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.wiz-item-history-mobile__image {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    cursor: pointer;
}

/* ── 3-dot actions button inside card header ────────────────── */
.wiz-item-history-mobile__actions {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 0;
}

/* ── Key / Value row (detail body) — no dividers by default ─── */
.wiz-item-history-mobile__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: baseline;
    column-gap: 12px;
    padding: 7px 0;
    border-bottom: none;
    font-size: 14px;
    line-height: 1.45;
}

.wiz-item-history-mobile__key {
    color: #6b7280;
    font-weight: 400;
    word-break: break-word;
}

.wiz-item-history-mobile__value {
    color: #111827;
    font-weight: 500;
    word-break: break-word;
    text-align: right;
}

/* Colon separator removed — keep rule so any cached HTML stays clean */
.wiz-item-history-mobile__sep {
    display: none;
}

.wiz-item-history-mobile__link {
    color: var(--primary, #3b82f6);
    text-decoration: none;
    font-weight: 500;
}

.wiz-item-history-mobile__link:hover {
    text-decoration: underline;
}

.wiz-item-history-mobile__thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border: 1px solid #e0e0e0;
    vertical-align: middle;
}

/* ================================================================
   Accordion (Additional Info) — full-width grey bar
   ================================================================ */
.wiz-item-history-mobile__accordion {
    border-top: 1px solid #e0e0e0;
    margin-top: 0;
}

.wiz-item-history-mobile__accordion-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    background: #f5f5f5;
    user-select: none;
    -webkit-user-select: none;
}

.wiz-item-history-mobile__accordion-summary::-webkit-details-marker {
    display: none;
}

.wiz-item-history-mobile__accordion-label {
    flex: 1 1 auto;
}

.wiz-item-history-mobile__accordion-chevron {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
    transition: transform 0.18s ease;
    flex-shrink: 0;
}

.wiz-item-history-mobile__accordion[open] .wiz-item-history-mobile__accordion-chevron {
    transform: rotate(180deg);
}

.wiz-item-history-mobile__accordion-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 14px 14px;
    margin: 0;
    background: #fafafa;
    border-top: none;
}

.wiz-item-history-mobile__accordion-body .wiz-item-history-mobile__row {
    border-bottom: none;
}

.wiz-item-history-mobile__accordion-body .wiz-item-history-mobile__row:first-child {
    padding-top: 4px;
}

.wiz-item-history-mobile__accordion-body .wiz-item-history-mobile__row:last-child {
    padding-bottom: 4px;
}

/* Always-open details: static section, no chevron / toggle */
.wiz-item-history-mobile__accordion--always-open > .wiz-item-history-mobile__accordion-summary {
    cursor: default;
}

.wiz-item-history-mobile__accordion--always-open > .wiz-item-history-mobile__accordion-summary .wiz-item-history-mobile__accordion-chevron {
    display: none;
}

/* ================================================================
   3-dot action menu reuse
   ================================================================ */
.wiz-item-history-mobile .item-history-listing-action-cell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* ================================================================
   Empty state
   ================================================================ */
.wiz-item-history-mobile__empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 16px;
    text-align: center;
}

.wiz-item-history-mobile__empty.is-visible {
    display: flex;
}

.wiz-item-history-mobile__empty-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.wiz-item-history-mobile__empty-subtitle {
    font-size: 13px;
    color: #6b7280;
}

/* ================================================================
   Pagination
   ================================================================ */
.wiz-item-history-mobile__pagination {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
}

.wiz-item-history-mobile__pagination .product-pagination {
    width: 100%;
}

.wiz-item-history-mobile__pagination .pagination-item {
    border-radius: 0 !important;
}

.wiz-item-history-mobile__pagination .pagination-active {
    background: var(--primary, #000);
    color: #fff;
}

.wiz-item-history-mobile__pagination .pagination-item:hover:not(.pagination-disabled):not(.pagination-active) {
    color: var(--primary, #000);
}
