/*
 * News (Listenansicht, Teaseransicht, Detailansicht, Menue, Related-Files)
 * Migrated from frontend/scss/includes/elements/_news.scss
 */

.news-list-view,
.news-teaser-view {
    & .article {
        margin-bottom: 3rem;
        overflow: visible;
    }

    & .news-img-wrap {
        margin-right: 2rem;
        margin-bottom: 1rem;
    }

    & h3 {
        font-size: 1.375rem;
        hyphens: auto;
        hyphenate-limit-chars: auto 5;
        hyphenate-limit-lines: 2;
    }

    & .teaser-text {
        hyphens: auto;
        hyphenate-limit-chars: auto 5;
        hyphenate-limit-lines: 2;
    }

    & .news-list-date {
        margin-bottom: 1rem;
    }

    & a.more {
        position: relative;
        padding-right: 13px;
    }

    & a.more::after {
        content: ">";
        font-family: monospace;
        display: inline-block;
        margin-left: 3px;
        position: relative;
        top: -1px;
    }
}

.news-list-view {
    & .news-img-wrap {
        max-width: 10rem;
        float: left;
    }
}

.news-teaser-view {
    @media (min-width: 768px) {
        width: 80%;
    }

    @media (min-width: 992px) {
        width: 70%;
    }

    & .article {
        background-color: #fff;
        padding: 2rem;
        box-shadow: 0 0 10px 0 #ced4da;

        @media (min-width: 768px) {
            display: flex;
        }
    }

    & .news-img-wrap {
        width: 10rem;

        @media (min-width: 768px) {
            flex-shrink: 0;
            flex-grow: 0;
        }

        & img {
            width: 100%;
        }
    }

    & .list-link {
        text-align: right;
    }
}

.news-single {
    & .news-img-wrap {
        width: 12.5rem;
        margin-right: 2rem;
        margin-bottom: 2rem;
        float: left;

        & img {
            width: 100%;
        }
    }

    & .news-list-date {
        margin-bottom: 1rem;
    }

    & h1,
    & .h2 {
        color: var(--abc-red);
    }

    & .news-backlink-wrap a {
        position: relative;
        padding-right: 13px;
    }

    & .news-backlink-wrap a::after {
        content: ">";
        font-family: monospace;
        display: inline-block;
        margin-left: 3px;
        position: relative;
        top: -1px;
    }
}

.news-menu-view {
    position: relative;

    & .dropdown-trigger {
        width: 15rem;
        padding: 4px 8px;
        background-color: #b42338;
        background-image: url("../../../Images/chevron-down.svg"), linear-gradient(to top, #a7162b 0%, #bc2b40 100%);
        background-position: right 4px top 50%, top left;
        background-repeat: no-repeat, repeat;
        color: #fff;
        cursor: pointer;
    }

    & .dropdown {
        position: absolute;
        top: 2.25rem;
        left: 0;
        width: 15rem;
        box-shadow: 0 0 10px 0 #ced4da;
        background-color: #fff;
        z-index: 1;
        display: none;

        &.show {
            display: block;
        }

        & ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        & li {
            border-bottom: 1px solid var(--abc-light-gray);

            &:last-child {
                border-bottom: 0;
            }
        }

        & a {
            display: block;
            padding: 4px 8px;
            transition: background-color 500ms, color 500ms;

            &:hover {
                background-color: var(--abc-red);
                color: #fff;
                text-decoration: none;
            }
        }
    }
}

.news-related-files {
    border-left: 2px solid var(--abc-medium-gray);
    background-color: var(--abc-off-white);
    padding: 1rem 1rem 1rem 2rem;
    margin-bottom: 1rem;

    & ul {
        padding: 0;
        margin: 0;
        list-style: none;
    }
}
