/*-----------------------------------------*/
/*--- COOKIES                    -------*/
/*--- CONTAINER                  -------*/
/*--- ACCORDIONS                 -------*/
/*--- FRONTEND LOGIN             -------*/
/*--- 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: #fff;
        border-bottom: 3px solid #01785b;
        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 {
            margin-bottom: 1.5rem;

            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: 10px;
                        font-size: 1.8rem;
                        line-height: calc(1.8rem * 1.5);
                        word-spacing: calc(1.8rem * 0.16);
                        font-weight: 600;

                        &:hover {
                            text-decoration: underline;
                        }

                        &:focus {
                            outline: 3px solid #FFB81C;
                            text-decoration: none;
                        }
                    }

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

                    &.btn-secondary {
                        background-color: #3f4040;
                        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 {
            background-color: transparent;
            border-bottom: none;
            padding: 0;

            #tx_cookies_close {
                display: block;
            }
        }
    }
}

/* 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 {
    margin: 20px 0;

    [class*="col-"]:empty {
        display: none !important;
    }
}

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

    .accordion-item {
        border: 2px solid transparent;
        border-radius: 10px;
        margin-bottom: 10px;

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

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

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

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

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

                &:hover {
                    text-decoration: underline;
                }

                &:focus {
                    box-shadow: none;
                    border-color: transparent;
                    outline: 3px solid #FFB81C;
                    text-decoration: none;
                }

                &:not(.collapsed) {
                    outline: 3px solid #FFB81C;
                    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 {
            border: 2px solid #A0C3B7;
            border-radius: 0 0 10px 10px;
            border-top: 0;

            [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;
                            }
                        }
                    }
                }
            }
        }
    }
}

/*--- FRONTEND LOGIN ---*/
.frame-type-felogin_login {
    margin-bottom: 1.5rem;

    form {
        fieldset {
            legend {
                display: none;
            }
        }
    }
}

/*--- SEARCH ---*/
/* SEARCH BOX */
.searchBox {
   .tx-kesearch-pi1 {
       .kesearchbox {
           #ke_search_sword {
               padding: 5px 10px;
           }
       }

       /* - SEARCH BOX BUTTON - */
       .submitbutt {
           input {
               padding: 5px;
           }
       }
   }
}

/* 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: #01785b;
           }
       }
   }

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

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

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

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

                   .page-item {
                       margin-left: 10px;
                       margin-bottom: 5px;

                       .page-link {
                           background-color: #E8EDEE;
                           color: #01785b;
                           padding: 5px 15px;
                           border-color: transparent;
                           font-size: 1.8rem;
                           line-height: calc(1.8rem * 1.5);
                           word-spacing: calc(1.8rem * 0.16);

                           &:hover {
                               text-decoration: underline;
                           }

                           &:focus {
                               outline: 3px solid #FFB81C;
                               box-shadow: none;
                               text-decoration: none;
                           }
                       }

                       &.active {
                           .page-link {
                               outline: 3px solid #FFB81C;
                               text-decoration: none;
                               font-weight: 600;
                           }
                       }
                   }
               }
           }
       }
   }
}

/*--- POWERMAIL ---*/
.tx-powermail {
    .powermail_form {
        /* ERROR BOX */
        .powermail_message_error {
            background-color: #f8d4d2;
            border: 2px solid #8b1309;
            padding: 10px;
            border-radius: 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 {
            background-color: #A0C3B7;
            padding: 10px;

            .powermail_fieldwrap {
                .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: 600;
                        border-radius: 10px;
                        padding: 5px 10px;
                        margin: 0 0 1.5rem;

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

                    /* - INPUTS - */
                    input:not([type=submit]),
                    textarea,
                    select,
                    &[type=radio],
                    &[type=checkbox] {
                        background-color: #fff;
                    }

                    /* - RADIO BUTTONS AND CHECKBOXES - */
                    p.powermail_label {
                        font-weight: 600;
                        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 {
            .tab-btn {
                border-radius: 10px;
                margin-right: 10px;

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

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

    /* 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: 10px;
                font-size: 1.8rem;
                line-height: calc(1.8rem * 1.5);
                word-spacing: calc(1.8rem * 0.16);
                font-weight: 600;
                background-color: #01785b;
                color: #fff;

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

                &:hover {
                    text-decoration: underline;
                }

                &:focus {
                    outline: 3px solid #FFB81C;
                    text-decoration: none;
                }
            }
        }
    }

    /* - CONFIRMATION MESSAGE - */
    .powermail_create {
        p:first-child {
            color: #01785b;
            font-weight: 600;
        }
    }
}

/* POWERMAIL MEDIA QUERIES */
@media screen and (max-width: 576px) {
    .tx-powermail {
        .powermail_form {
            /* - SPLIT PAGES - */
            /* -- 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;
            }
        }
    }
}