/* WSO Core - Newest Additions resource rows. */

.wso-newest-list,
.entry-content .wso-newest-list {
    display: grid !important;
    gap: 12px;
    grid-template-columns: 1fr;
    margin: 0;
    overflow: visible !important;
}

.wso-newest-row,
.entry-content .wso-newest-list > a.wso-newest-row {
    --wso-newest-paper: var(--cs-site-background, var(--color-white, #fff));
    --wso-newest-ink: var(--cs-color-primary, var(--color-black, #000));
    --wso-newest-muted: var(--cs-color-secondary, var(--color-gray-600, #525252));
    --wso-newest-line: var(--cs-color-border, var(--color-gray-300, #d4d4d4));
    --wso-newest-accent: var(--cs-color-secondary, var(--color-gray-500, #737373));
    --wso-newest-category: var(--cs-color-secondary, var(--color-gray-600, #525252));
    --wso-newest-shadow: rgba(0, 0, 0, 1);
    align-items: stretch;
    background: var(--wso-newest-paper) !important;
    background-image: none !important;
    border: 1px solid var(--wso-newest-line);
    color: var(--wso-newest-ink) !important;
    display: grid !important;
    grid-template-columns: 4px minmax(0, 1fr);
    min-height: 112px;
    overflow: visible;
    padding: 18px 96px 18px 0 !important;
    position: relative;
    text-decoration: none !important;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.wso-newest-row.has-topic-palette,
.entry-content .wso-newest-list > a.wso-newest-row.has-topic-palette {
    --wso-newest-shadow: var(--wso-topic-500);
    background: color-mix(in srgb, var(--wso-topic-50) 64%, var(--cs-site-background, var(--color-white, #fff))) !important;
    border-color: color-mix(in srgb, var(--wso-topic-200) 56%, var(--cs-color-border, var(--color-gray-300, #d4d4d4)));
}

.wso-newest-row:hover,
.wso-newest-row:focus-visible,
.entry-content .wso-newest-list > a.wso-newest-row:hover,
.entry-content .wso-newest-list > a.wso-newest-row:focus-visible {
    background: var(--cs-layout-background, var(--color-gray-50, #fafafa)) !important;
    background-image: none !important;
    border-color: color-mix(in srgb, var(--wso-newest-accent) 32%, var(--wso-newest-line));
    box-shadow: 2px 2px 0 var(--wso-newest-shadow) !important;
    text-decoration: none !important;
    transform: translate(-2px, -2px);
    z-index: 2;
}

.wso-newest-row.has-topic-palette:hover,
.wso-newest-row.has-topic-palette:focus-visible,
.entry-content .wso-newest-list > a.wso-newest-row.has-topic-palette:hover,
.entry-content .wso-newest-list > a.wso-newest-row.has-topic-palette:focus-visible {
    background: color-mix(in srgb, var(--wso-topic-100) 74%, var(--cs-site-background, var(--color-white, #fff))) !important;
    border-color: color-mix(in srgb, var(--wso-topic-400) 46%, var(--cs-color-border, var(--color-gray-300, #d4d4d4)));
    box-shadow: 2px 2px 0 var(--wso-newest-shadow) !important;
}

.wso-newest-row:focus-visible,
.entry-content .wso-newest-list > a.wso-newest-row:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--wso-newest-accent) 68%, var(--wso-newest-ink));
    outline-offset: 2px;
}

.wso-newest-row.has-topic-palette:focus-visible,
.entry-content .wso-newest-list > a.wso-newest-row.has-topic-palette:focus-visible {
    outline-color: var(--wso-topic-500);
}

.wso-newest-row__accent {
    background: var(--wso-newest-accent);
    display: block;
    opacity: 0.64;
}

.wso-newest-row.has-topic-palette .wso-newest-row__accent {
    background: var(--wso-topic-500);
    opacity: 0.72;
}

.wso-newest-row__content {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 0 20px;
}

.wso-newest-row__title {
    color: var(--wso-newest-ink);
    display: block;
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    margin: 0;
    overflow-wrap: anywhere;
    padding-right: 12px;
    text-decoration: none;
}

.wso-newest-row:hover .wso-newest-row__title,
.wso-newest-row:focus-visible .wso-newest-row__title,
.entry-content .wso-newest-list > a.wso-newest-row:hover .wso-newest-row__title,
.entry-content .wso-newest-list > a.wso-newest-row:focus-visible .wso-newest-row__title {
    color: var(--wso-newest-ink);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

.wso-newest-row.has-topic-palette:hover .wso-newest-row__title,
.wso-newest-row.has-topic-palette:focus-visible .wso-newest-row__title,
.entry-content .wso-newest-list > a.wso-newest-row.has-topic-palette:hover .wso-newest-row__title,
.entry-content .wso-newest-list > a.wso-newest-row.has-topic-palette:focus-visible .wso-newest-row__title {
    color: var(--wso-topic-700);
}

.wso-newest-row__excerpt {
    color: var(--wso-newest-muted);
    display: block;
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.5;
    max-width: 760px;
    text-decoration: none;
}

.wso-newest-row__category {
    color: var(--wso-newest-category);
    display: block;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
    text-decoration: none;
}

.wso-newest-row.has-topic-palette .wso-newest-row__category {
    color: var(--wso-topic-700);
}

.wso-newest-row__badge.card-badge {
    right: 18px;
    top: 18px;
}

body[data-scheme="dark"] .wso-newest-row,
[data-scheme="dark"] .wso-newest-row,
body[data-scheme="auto"][data-d="dark"] .wso-newest-row,
[data-scheme="auto"][data-d="dark"] .wso-newest-row,
body[data-scheme="auto"][data-l="dark"] .wso-newest-row,
[data-scheme="auto"][data-l="dark"] .wso-newest-row {
    --wso-newest-paper: var(--cs-site-background, #161616);
    --wso-newest-ink: var(--cs-color-primary, #f2f2f2);
    --wso-newest-muted: var(--cs-color-secondary, #a8a8a8);
    --wso-newest-line: var(--cs-color-border, #494949);
    --wso-newest-accent: var(--cs-color-secondary, #8a8a8a);
    --wso-newest-category: var(--cs-color-secondary, #a8a8a8);
}

body[data-scheme="dark"] .wso-newest-row.has-topic-palette,
[data-scheme="dark"] .wso-newest-row.has-topic-palette,
body[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette,
[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette,
body[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette,
[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette {
    --wso-newest-shadow: var(--wso-topic-500);
    background: color-mix(in srgb, var(--wso-topic-500) 6%, var(--cs-site-background, #161616)) !important;
    border-color: color-mix(in srgb, var(--wso-topic-500) 28%, var(--cs-color-border, #494949));
}

body[data-scheme="dark"] .wso-newest-row.has-topic-palette:hover,
body[data-scheme="dark"] .wso-newest-row.has-topic-palette:focus-visible,
[data-scheme="dark"] .wso-newest-row.has-topic-palette:hover,
[data-scheme="dark"] .wso-newest-row.has-topic-palette:focus-visible,
body[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette:hover,
body[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette:focus-visible,
[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette:hover,
[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette:focus-visible,
body[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette:hover,
body[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette:focus-visible,
[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette:hover,
[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette:focus-visible {
    background: color-mix(in srgb, var(--wso-topic-500) 9%, var(--cs-site-background, #161616)) !important;
    border-color: color-mix(in srgb, var(--wso-topic-500) 42%, var(--cs-color-border, #494949));
    box-shadow: 2px 2px 0 var(--wso-newest-shadow) !important;
}

body[data-scheme="dark"] .wso-newest-row.has-topic-palette .wso-newest-row__category,
[data-scheme="dark"] .wso-newest-row.has-topic-palette .wso-newest-row__category,
body[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette .wso-newest-row__category,
[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette .wso-newest-row__category,
body[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette .wso-newest-row__category,
[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette .wso-newest-row__category,
body[data-scheme="dark"] .wso-newest-row.has-topic-palette:hover .wso-newest-row__title,
body[data-scheme="dark"] .wso-newest-row.has-topic-palette:focus-visible .wso-newest-row__title,
[data-scheme="dark"] .wso-newest-row.has-topic-palette:hover .wso-newest-row__title,
[data-scheme="dark"] .wso-newest-row.has-topic-palette:focus-visible .wso-newest-row__title,
body[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette:hover .wso-newest-row__title,
body[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette:focus-visible .wso-newest-row__title,
[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette:hover .wso-newest-row__title,
[data-scheme="auto"][data-d="dark"] .wso-newest-row.has-topic-palette:focus-visible .wso-newest-row__title,
body[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette:hover .wso-newest-row__title,
body[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette:focus-visible .wso-newest-row__title,
[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette:hover .wso-newest-row__title,
[data-scheme="auto"][data-l="dark"] .wso-newest-row.has-topic-palette:focus-visible .wso-newest-row__title {
    color: var(--wso-topic-300);
}

@media (max-width: 768px) {
    .wso-newest-row,
    .entry-content .wso-newest-list > a.wso-newest-row {
        min-height: 0;
        padding: 16px 72px 16px 0 !important;
    }

    .wso-newest-row__content {
        gap: 6px;
        padding: 0 14px;
    }

    .wso-newest-row__title {
        font-size: 1rem;
        padding-right: 0;
    }

    .wso-newest-row__badge.card-badge {
        right: 14px;
        top: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wso-newest-row:hover,
    .wso-newest-row:focus-visible,
    .entry-content .wso-newest-list > a.wso-newest-row:hover,
    .entry-content .wso-newest-list > a.wso-newest-row:focus-visible {
        transform: none;
    }
}
