.is-just-viewed {
    box-shadow: 0 0 0 3px var(--scout-brand-color, #E74D4D);
    background-color: rgba(231, 77, 77, 0.04);
    transition: box-shadow 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.is-just-viewed.is-just-viewed-fading {
    box-shadow: 0 0 0 0 rgba(231, 77, 77, 0);
    background-color: rgba(231, 77, 77, 0);
}

@media (prefers-reduced-motion: reduce) {
    .is-just-viewed {
        transition: none;
    }
    .is-just-viewed.is-just-viewed-fading {
        box-shadow: none;
        background-color: transparent;
    }
}

.sa-viewed-pill {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: rgba(17, 24, 39, 0.75);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.homepage-content-middle-row-item {
    position: relative; /* anchor the absolutely-positioned pill */
}

.sa-back-to-results {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--scout-brand-color, #E74D4D);
    text-decoration: none;
    padding: 6px 12px;
    margin: 12px 0;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.sa-back-to-results:hover {
    background-color: rgba(231, 77, 77, 0.08);
}

.sa-back-to-results.d-none {
    display: none;
}

#sa-search-progress {
    position: relative;
    height: 2px;
    overflow: hidden;
    background: transparent;
    margin-bottom: 8px;
}

#sa-search-progress::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 30%;
    background: var(--scout-brand-color, #E74D4D);
    animation: sa-progress-slide 1s linear infinite;
}

@keyframes sa-progress-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

#listings.sa-loading .homepage-content-middle-row-item {
    opacity: 0.5;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.sa-relaxed-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(231, 77, 77, 0.08);
    color: #111827;
    padding: 10px 16px;
    margin: 12px 0;
    border-radius: 4px;
    font-size: 14px;
}

.sa-relaxed-banner a {
    color: var(--scout-brand-color, #E74D4D);
    font-weight: 500;
    text-decoration: none;
    flex-shrink: 0;
}

.sa-relaxed-banner a:hover {
    text-decoration: underline;
}

.sa-empty-state {
    text-align: center;
    padding: 48px 16px;
    max-width: 560px;
    margin: 0 auto;
}

.sa-empty-headline {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.sa-empty-sub {
    color: #6B7280;
    font-size: 14px;
}

.sa-empty-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.sa-empty-chip {
    display: inline-block;
    padding: 4px 12px;
    background: #F3F4F6;
    color: #6B7280;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.sa-empty-chip:hover {
    background: #E5E7EB;
    color: #111827;
}

.sa-empty-chip s {
    text-decoration: line-through;
}

.sa-empty-exits {
    margin-top: 16px;
    color: #6B7280;
    font-size: 14px;
}

.sa-empty-exits a {
    color: var(--scout-brand-color, #E74D4D);
    text-decoration: none;
    margin: 0 4px;
}

.sa-empty-exit-sep {
    color: #D1D5DB;
}
