/*
 * Duplast PIM admin tweaks.
 *
 * Status badges: Tabler's .bg-* utilities set a background but no foreground, so
 * `badge bg-secondary` rendered grey text on a grey background — a measured contrast
 * ratio of 1.00, i.e. invisible (SP-1992). The -lt variants are readable but only
 * reach ~2:1. These two pairs clear 4.5:1 in both the light and the dark theme.
 */
.badge.pim-status-publish {
    background-color: #d3f9d8;
    color: #256c33;
}

.badge.pim-status-draft {
    background-color: #ffec99;
    color: #8a5300;
}

[data-bs-theme='dark'] .badge.pim-status-publish {
    background-color: rgba(47, 179, 68, 0.18);
    color: #8ce99a;
}

[data-bs-theme='dark'] .badge.pim-status-draft {
    background-color: rgba(245, 159, 0, 0.18);
    color: #ffd43b;
}

/*
 * Product preview (SP-1999). The stock show table gave labels and values the same
 * weight, so nothing stood out; these rules separate the two and make the photos
 * large enough to judge.
 */
.pim-preview-sku {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tblr-secondary);
}

.pim-preview-name {
    margin: 0.125rem 0 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
}

.pim-preview-list {
    display: grid;
    grid-template-columns: minmax(9rem, 40%) 1fr;
    gap: 0.375rem 1rem;
    margin: 0;
}

.pim-preview-list dt {
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--tblr-secondary);
}

.pim-preview-list dd {
    margin: 0;
    font-weight: 600;
    color: var(--tblr-body-color);
    overflow-wrap: anywhere;
}

.pim-preview-list dd.is-empty {
    font-weight: 400;
    color: var(--tblr-secondary);
}

.pim-preview-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pim-preview-image {
    display: block;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    overflow: hidden;
    background: var(--tblr-bg-surface-secondary);
}

.pim-preview-image.is-primary {
    border-color: var(--tblr-primary);
}

.pim-preview-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.pim-preview-image-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
    border: 1px dashed var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
}

@media (max-width: 575.98px) {
    .pim-preview-list {
        grid-template-columns: 1fr;
        gap: 0 0;
    }

    .pim-preview-list dd {
        margin-bottom: 0.5rem;
    }
}
