/* =========================================================
 * NEXPELL – ARTICLES SIDEBAR
 * ========================================================= */

.nx-articles-widget {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.nx-articles-widget > .nx-height-head {
    flex: 0 0 auto;
}

/* Die eingestellte Widget-Höhe wird von widget_height.js gesetzt. */
.nx-articles-widget > .nx-height-body {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.nx-articles-widget .nx-height-content {
    display: block;
    flex: 1 1 auto !important;
    width: 100%;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
}

.nx-articles-widget .nx-articles-entry {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    width: 100%;
    box-sizing: border-box;
    padding: .75rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.nx-articles-widget .nx-articles-entry:last-child {
    border-bottom: 0;
}

.nx-articles-widget .nx-articles-entry[hidden] {
    display: none !important;
}

.nx-articles-widget .nx-articles-date {
    display: flex;
    flex: 0 0 3.2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.05;
    text-align: center;
}

.nx-articles-widget .nx-articles-day {
    font-size: 1.15rem;
    font-weight: 700;
}

.nx-articles-widget .nx-articles-month,
.nx-articles-widget .nx-articles-year {
    font-size: .7rem;
    opacity: .72;
}

.nx-articles-widget .nx-articles-main {
    flex: 1 1 auto;
    min-width: 0;
}

.nx-articles-widget .nx-articles-title {
    display: block;
    overflow: hidden;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-articles-widget .nx-articles-text {
    display: -webkit-box;
    margin-top: .25rem;
    overflow: hidden;
    font-size: .82rem;
    line-height: 1.35;
    opacity: .82;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.nx-articles-widget .nx-articles-meta {
    margin-top: .3rem;
    font-size: .72rem;
    opacity: .65;
}

.nx-articles-widget .nx-articles-empty {
    display: block;
    padding: .85rem;
    opacity: .7;
}

.nx-articles-widget > .nx-height-footer {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    box-sizing: border-box;
    margin: 0 !important;
}

.nx-articles-widget .nx-height-more {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    line-height: 1.2;
}

/* Von widget_height.js aktivierter Zustand */
.nx-articles-widget.nx-height-widget.nx-height-collapsed {
    display: flex !important;
    flex-direction: column !important;
    height: var(--nx-widget-height) !important;
    min-height: var(--nx-widget-height) !important;
    max-height: var(--nx-widget-height) !important;
    overflow: hidden !important;
}

.nx-articles-widget.nx-height-collapsed > .nx-height-body,
.nx-articles-widget.nx-height-collapsed .nx-height-content {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
}

/* Kompakte Darstellung */
.nx-articles-widget.nx-widget-compact .nx-articles-entry {
    gap: .55rem;
    padding: .45rem .65rem;
}

.nx-articles-widget.nx-widget-compact .nx-articles-date {
    flex-basis: 2.8rem;
}

.nx-articles-widget.nx-widget-compact .nx-articles-text {
    font-size: .76rem;
    -webkit-line-clamp: 1;
}

.nx-articles-widget.nx-widget-compact .nx-articles-meta {
    margin-top: .15rem;
}

@media (max-width: 767.98px) {
    .nx-articles-widget .nx-articles-entry {
        gap: .6rem;
        padding-left: .65rem;
        padding-right: .65rem;
    }
}
