/*-----------------------------------------*/
/*--- COOKIES                       -------*/
/*--- CONTAINER                     -------*/
/*--- ACCORDIONS                    -------*/
/*--- SEARCH                        -------*/
/*--- POWERMAIL                     -------*/
/*-----------------------------------------*/

/*--- COOKIES ---*/
#tx_cookies {
    /* COOKIE SETTINGS BUTTON */
    .cookieSettings-btn {
        display: none;
    }

    /* TYPO3 MESSAGES */
    .typo3-messages {
        display: none;
        visibility: hidden;
    }

    /* COOKIE SELECTION BOX */
    #tx_cookies_inner {
        position: relative;
        top: 0;
        bottom: unset;
        z-index: unset;
        background-color: #E8EDEE;
        padding: 20px;

        &.show {
            display: block;
        }

        #tx_cookies_close {
            display: none;

            &::after {
                content: "";
                padding: 0;
            }
        }

        h2 {
            margin: 0 0 10px;
        }

        a {
            text-decoration: underline;
        }

        /* - COOKIE ACCEPT/REJECT BUTTONS - */
        .cookie-controls {
            form {
                width: 100%;
            }

            .cookie-controls-btn {
                display: flex;
                justify-content: space-between;
                gap: 10px;

                input {
                    width: 100%;
                    white-space: normal;

                    &.btn-primary, &.primary-btn,
                    &.btn-secondary {
                        display: inline-block;
                        padding: 8px 25px;
                        outline: none;
                        border: 0;
                        border-radius: 5px;
                        font-size: 1.6rem;
                        line-height: calc(1.6rem * 1.5);
                        word-spacing: calc(1.6rem * 0.16);
                        text-decoration: none;

                        &:hover, &:focus {
                            background: #FFB81C !important;
                            color: #231F20 !important;
                            box-shadow: none !important;
                            text-decoration: none;
                        }

                        &:hover {
                            text-decoration: underline !important;
                        }
                    }

                    &.btn-primary, &.primary-btn {
                        background-color: #E6007D;
                        color: #fff;
                    }

                    &.btn-secondary {
                        background-color: #D80D45;
                        color: #fff;
                    }
                }
            }
        }
    }
}

/* COOKIE PAGE ONLY */
.cookies-btn {
    #tx_cookies {
        #tx_cookies_showPermanent, #tx_cookies_inner {
            position: static;
            transition: none;
        }

        /* - COOKIE SELECTION BOX - */
        #tx_cookies_inner {
            border-radius: 5px;

            #tx_cookies_close {
                display: block;
                width: auto;
            }
        }
    }
}

/* COOKIES MEDIA QUERIES */
@media screen and (max-width: 576px) {
    /* - COOKIE SELECTION BOX - */
    #tx_cookies_inner {
        &.show {
            display: inline-block;
        }

        #tx_cookies_close {
            float: none;
            margin-left: 0;
        }

        /* - COOKIE ACCEPT/REJECT BUTTONS - */
        .cookie-controls {
            .cookie-controls-btn {
                justify-content: flex-start;
                flex-direction: column;
            }
        }
    }
}

/*--- CONTAINER ---*/
.grid-container {
    [class*="col-"]:empty {
        display: none !important;
    }
}

/*--- ACCORDIONS ---*/
.accordion {
    margin-bottom: 1.5rem;

    .accordion-item {
        border: 1px solid #E8EDEE;
        border-radius: 0;
        margin-bottom: 5px;

        &:first-of-type {
            .accordion-button {
                border-top-left-radius: 0;
                border-top-right-radius: 0;
            }
        }

        &:last-of-type {
            .accordion-button {
                border-bottom-left-radius: 0;
                border-bottom-right-radius: 0;
            }

            /* OVERRIDES BOOTSTRAP BORDER RADIUS */
            &>.accordion-header {
                .accordion-button {
                    &.collapsed {
                        border-bottom-right-radius: 0;
                        border-bottom-left-radius: 0;
                    }
                }
            }
        }

        /* ACCORDION HEADER/BUTTON */
        .accordion-header {
            margin: 0;

            .accordion-button {
                display: flex;
                justify-content: space-between;
                align-items: center;
                width: 100%;
                background-color: #D80D45;
                color: #fff;
                border-radius: 0;
                border: 0;
                padding: 10px;
                margin-bottom: 0;
                text-align: left;
                font-size: 1.6rem;
                line-height: calc(1.6rem * 1.5);
                word-spacing: calc(1.6rem * 0.16);

                &:hover, &:focus {
                    background: #fcc100 !important;
                    color: #231f20 !important;
                    box-shadow: none;
                    border-color: transparent;
                }

                &:hover {
                    text-decoration: underline;
                }

                &:not(.collapsed) {
                    background: #fcc100 !important;
                    color: #231f20 !important;
                    box-shadow: none;
                    border-color: transparent;
                    text-decoration: none;
                }

                &::after {
                    content: none;
                }

                /* - SETS ACCORDION TOGGLE ICON WHEN CLOSED - */
                .accordion-toggle-text {
                    margin-left: auto;

                    &:after {
                        content: '\002B';
                        margin-left: 10px;
                    }
                }

                /* - SETS ACCORDION TOGGLE ICON WHEN OPEN - */
                &:not(.collapsed) {
                    .accordion-toggle-text {
                        &::after {
                            content: '\2212';
                        }
                    }
                }
            }
        }

        /* ACCORDION BODY */
        .accordion-body {
            [data-label="header"] {
                &:first-child {
                    display: none;
                }

                /* - HEADING STYLING FOR ACCORDIONS INSIDE ACCORDIONS */
                .accordion {
                    h2 {
                        &:first-child {
                            display: block;
                        }
                    }

                    .accordion-body {
                        h2 {
                            &:first-child {
                                display: none;
                            }
                        }
                    }
                }
            }
        }
    }
}

/*--- SEARCH ---*/
/* SEARCH BOX */
.searchBox {
    .kesearchbox {
        label {
            margin-bottom: 5px !important;
        }
        #ke_search_sword {
            border: 2px solid #231f20 !important;
            color: #231f20;
            margin-bottom: 5px !important;
            font-size: 1.4rem;
            line-height: calc(1.4rem * 1.5);
            word-spacing: calc(1.4rem * 0.16);
        }
    }

    /* - SEARCH BOX BUTTON */
    .submitbutt {
        position: relative;
        display: block;

        input {
            position: absolute;
            top: -42px;
            right: 2px;
            min-width: 35px !important;
            max-width: 35px !important;
            border: 0 !important;
            background-color: transparent !important;
            padding: 8px;
        }
    }
}

/* SEARCH PAGE */
.tx-kesearch-pi1 {
    /* - RESULT NUMBER - */
    #kesearch_num_results {
        margin-bottom: 10px;
        color: #231f20;
    }

    /* - RESULTS LIST - */
    #kesearch_results {
        .result-list-item {
            margin: 10px 0;

            .result-teaser {
                color: #231f20;
            }

            /* -- SEARCH HITS -- */
            .hit {
                color: #E6007D;
                font-weight: bold;
            }
        }
    }

    /* - PAGINATION - */
    #kesearch_pagebrowser_bottom {
        color: #231f20;
        text-align: left;
        margin: 30px 0 0;

        .pages_total {
            border-top: 3px solid #E6007D;

            .result_txt {
                color: #231f20;
                margin: 10px 0;
            }

            .kesearch_pagebrowser {
                .pagination {
                    display: flex;
                    align-items: center;
                    flex-wrap: wrap;
                    margin-bottom: 0;
                    margin-left: 0;

                    .page-item {
                        margin: 0;
                        margin-bottom: 1.5rem;
                        margin-right: 10px;

                        .page-link {
                            background-color: #E6007D;
                            color: #fff;
                            padding: 5px 15px;
                            border-color: transparent;
                            border-radius: 0;
                            font-weight: normal;
                            font-size: 1.6rem;
                            line-height: calc(1.6rem * 1.5);
                            word-spacing: calc(1.6rem * 0.16);

                            &:hover, &:focus {
                                background: #FFB81C;
                                color: #231F20 !important;
                                box-shadow: none!important;
                            }

                            &:hover {
                                text-decoration: underline;
                            }
                        }

                        &.active {
                            .page-link {
                                background: #FFB81C;
                                color: #231F20 !important;
                                box-shadow: none !important;
                                text-decoration: none;
                            }
                        }
                    }
                }
            }
        }
    }
}

/*--- POWERMAIL ---*/
.tx-powermail {
    .powermail_form {
        /* ERROR BOX */
        .powermail_message_error {
            background-color: #f8d4d2;
            border: 2px solid #8b1309;
            padding: 10px;
            margin-bottom: 1.5rem;

            h2 {
                font-size: 2.6rem;
                line-height: calc(2.6rem * 1.5);
                word-spacing: calc(2.6rem * 0.16);
            }

            ol {
                font-weight: 600;
            }
        }

        /* TEXT AS A FIELD */
        .powermail_fieldwrap_type_text {
            margin-bottom: 10px;
        }

        /* FORM FIELDS */
        .powermail_fieldset {
            .powermail_fieldwrap {
                margin-bottom: 10px;

                .powermail_field {
                    /* - INLINE ERRORS - */
                    &:has(.powermail-errors-list) {
                        input {
                            margin-bottom: 6px;
                        }
                        textarea {
                            margin-bottom: 0;
                        }
                    }

                    .powermail-errors-list {
                        background-color: #f8d4d2;
                        border: 2px solid #8b1309;
                        font-size: 1.6rem;
                        line-height: calc(1.6rem * 1.5);
                        word-spacing: calc(1.6rem * 0.16);
                        font-weight: bold;
                        padding: 5px 10px;
                        margin: 0 0 1.5rem;

                        li {
                            list-style: none;
                            margin-left: 0;
                        }
                    }

                    /* - RADIO BUTTONS AND CHECKBOXES - */
                    p.powermail_label {
                        font-weight: bold;
                        margin-bottom: 5px;
                    }

                    .powermail_radiowrap,
                    .powermail_checkwrap {
                        display: flex;
                        align-items: center;
                        margin-bottom: 1.5rem;

                        label {
                            margin-bottom: 0;
                            font-weight: normal;
                        }
                    }
                }
            }
        }

        /* SPLIT PAGES */
        /* - TABS - */
        .powermail_multistep_navigation {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 10px;

            .tab-btn {
                border-radius: 5px;

                &.active {
                    text-decoration: underline;
                }
            }
        }

        /* - BUTTONS - */
        .powermail_tab_navigation {
            display: flex;
            align-items: center;
            gap: 1.5rem;

            button {
                margin-bottom: 0;
            }
        }
    }

    /* CONFIRMATION PAGE */
    .powermail_confirmation {
        h2 {
            font-size: 2.6rem;
            line-height: calc(2.6rem * 1.5);
            word-spacing: calc(2.6rem * 0.16);
        }

        /* - CONFIRMATION TABLE - */
        figure.table {
            table {
                tbody {
                    th {
                        font-weight: normal;
                    }
                }
            }
        }

        /* - CONFIRMATION BUTTONS - */
        .powermail_tab_navigation {
            display: flex;
            align-items: center;
            gap: 1.5rem;

            input[type=submit] {
                display: inline-block;
                padding: 8px 25px;
                outline: none;
                border: 0;
                border-radius: 5px;
                font-size: 1.6rem;
                line-height: calc(1.6rem * 1.5);
                word-spacing: calc(1.6rem * 0.16);
                background-color: #E6007D;
                color: #fff;

                &.secondary-btn {
                    background-color: #DB005B;
                    color: #fff;
                }

                &:hover, &:focus {
                    background-color: #ffb81C;
                    color: #231f20;
                    box-shadow: none !important;
                    outline: none;
                }

                &:hover {
                    text-decoration: underline;
                }
            }
        }
    }

    /* - CONFIRMATION MESSAGE - */
    .powermail_create {
        p:first-child {
            color: #E6007D;
            font-weight: bold;
        }
    }
}

/* POWERMAIL MEDIA QUERIES */
@media screen and (max-width: 576px) {
    .tx-powermail {
        .powermail_form {
            /* - SPLIT PAGES - */
            /* - TABS - */
            .powermail_multistep_navigation {
                flex-direction: column;
                gap: 0;
            }

            /* -- BUTTONS -- */
            .powermail_tab_navigation {
                flex-direction: column;
                align-items: flex-start;
                gap: 0;
            }
        }

        /* - CONFIRMATION PAGE - */
        .powermail_confirmation {
            /* -- CONFIRMATION BUTTONS -- */
            .powermail_tab_navigation {
                flex-direction: column;
                align-items: flex-start;
                gap: 0;
            }
        }
    }
}