/* Product lookup: "Decoded from ..." on scan results and card backs and the admin Products page */

.product-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--sc-line);
    border-radius: var(--sc-radius);
    background: rgba(var(--sc-surface-rgb, 20, 30, 60), 0.72);
    color: var(--sc-text);
    font-size: 14px;
    line-height: 1.3;
    animation: product-in 0.35s var(--sc-ease-out, ease-out) both;
}

.product-line.is-compact {
    margin: 0;
    padding: 8px 10px;
    font-size: 13px;
}

.product-line.is-name-only {
    gap: 8px;
    padding: 6px 10px;
    border-style: dashed;
    background: transparent;
}

.product-line.is-name-only.is-pending,
.product-line.is-name-only.is-unavailable {
    color: var(--sc-text-muted);
    font-style: italic;
}

.product-line.is-name-only .product-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-line.is-pending,
.product-line.is-unavailable {
    color: var(--sc-text-muted);
}

.product-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: color-mix(in srgb, #ffb347 22%, transparent);
    color: #ffb347;
    font-size: 18px;
}

.product-line.is-compact .product-icon {
    width: 28px;
    height: 28px;
    font-size: 15px;
}

.product-line.is-notfound .product-icon {
    background: var(--sc-purple-soft);
    color: var(--sc-purple);
}

.product-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: anywhere;
}

.product-name {
    font-family: var(--sc-font-display);
    font-weight: 600;
}

.product-brand {
    color: var(--sc-text-muted);
}

.product-credit {
    margin-top: 2px;
    color: var(--sc-text-faint);
    font-size: 11px;
}

.product-photo-btn {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid var(--sc-line-strong);
    border-radius: var(--sc-radius-pill);
    background: none;
    color: var(--sc-text-muted);
    font-size: 12px;
}

.product-photo {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: calc(10px * var(--sc-radius-scale, 1));
    background: #fff;
    object-fit: contain;
}

.product-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -3px;
    animation: product-spin 0.8s linear infinite;
}

@keyframes product-spin {
    to { transform: rotate(360deg); }
}

@keyframes product-in {
    from { opacity: 0; transform: translateY(4px); }
}

.admin-product-tags {
    color: var(--sc-text-faint);
    overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
    .product-line {
        animation: none;
    }
}
