/* ════════════════════════════════════════════════════════
   Personalization display (shared component)
   Renders the contents of PersonalizationsJson on cart, order,
   and admin order detail pages. All tokens flow through the
   theme system — no hard-coded colors.
   ════════════════════════════════════════════════════════ */

.swag-pers-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--color-border);
}

.swag-pers-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.82rem;
}

.swag-pers-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.swag-pers-value {
    font-size: 0.88rem;
    color: var(--color-text);
    word-break: break-word;
}

/* Image personalization preview ─ thumb + filename + dimensions. */
.swag-pers-image-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.swag-pers-image-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    flex-shrink: 0;
}

/* Vector tile ─ same footprint as the thumbnail so rows line up. */
.swag-pers-image-tile {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    flex-shrink: 0;
    text-decoration: none;
}

.swag-pers-image-tile-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.swag-pers-image-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.swag-pers-image-filename {
    font-size: 0.85rem;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.swag-pers-image-meta {
    font-size: 0.74rem;
    color: var(--color-text-muted);
}

/* ── Admin surface override ─────────────────────────────────────────────
   Admin pages don't load shop-theme.css, so they need a parallel set of
   tokens. Adding `swag-pers-admin` via ExtraClass swaps the relevant
   surface variables for their --adm-* equivalents without changing
   layout. */

.swag-pers-list.swag-pers-admin {
    border-top-color: var(--adm-border);
}

    .swag-pers-list.swag-pers-admin .swag-pers-label {
        color: var(--adm-text-muted);
    }

    .swag-pers-list.swag-pers-admin .swag-pers-value {
        color: var(--adm-text);
    }

    .swag-pers-list.swag-pers-admin .swag-pers-image-thumb,
    .swag-pers-list.swag-pers-admin .swag-pers-image-tile {
        border-color: var(--adm-border);
    }

    .swag-pers-list.swag-pers-admin .swag-pers-image-tile {
        background: var(--adm-surface-2);
        color: var(--adm-text-muted);
    }

    .swag-pers-list.swag-pers-admin .swag-pers-image-filename {
        color: var(--adm-text);
    }

    .swag-pers-list.swag-pers-admin .swag-pers-image-meta {
        color: var(--adm-text-muted);
    }
