/*!
 * Copyright 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
.k-panelbar {
    .fill(
        @panelbar-text,
        @panelbar-bg,
        @panelbar-border
    );


    // Root
    > .k-item,
    > .k-panelbar-header {

        // Normal
        > .k-link {
            .fill(
                @panelbar-header-text,
                @panelbar-header-bg,
                @panelbar-header-border,
                @panelbar-header-gradient
            );

            .k-icon,
            .k-panelbar-item-icon {
                color: @panelbar-text;
            }
        }

        // Hover
        > .k-link:hover,
        > .k-link.k-state-hover,
        > .k-link.k-hover {
            .fill(
                @panelbar-header-hovered-text,
                @panelbar-header-hovered-bg,
                @panelbar-header-hovered-border,
                @panelbar-header-hovered-gradient
            );
        }

        // Focus
        > .k-link:focus,
        > .k-link.k-state-focus,
        > .k-link.k-state-focused,
        > .k-link.k-focus {
            .fill(
                @panelbar-header-focused-text,
                @panelbar-header-focused-bg,
                @panelbar-header-focused-border,
                @panelbar-header-focused-gradient
            );

            box-shadow: @panelbar-header-focused-shadow;
        }

        // Focus & Hover
        > .k-link:focus:hover,
        > .k-link.k-state-focus.k-state-hover,
        > .k-link.k-state-focus.k-hover,
        > .k-link.k-focus.k-state-hover,
        > .k-link.k-focus.k-hover {
            .fill(
                @panelbar-header-hovered-focused-text,
                @panelbar-header-hovered-focused-bg,
                @panelbar-header-hovered-focused-border,
                @panelbar-header-hovered-focused-gradient
            );
        }

        // Selected
        > .k-link.k-state-selected,
        > .k-link.k-selected {
            .fill(
                @panelbar-header-selected-text,
                @panelbar-header-selected-bg,
                @panelbar-header-selected-border,
                @panelbar-header-selected-gradient
            );

            .k-icon,
            .k-panelbar-item-icon {
                color: inherit;
            }
        }

        // Selected Hover
        > .k-link.k-state-selected:hover,
        > .k-link.k-selected:hover,
        > .k-link.k-state-selected.k-state-hover,
        > .k-link.k-state-selected.k-hover,
        > .k-link.k-selected.k-state-hover,
        > .k-link.k-selected.k-hover {
            .fill(
                @panelbar-header-selected-hovered-text,
                @panelbar-header-selected-hovered-bg,
                @panelbar-header-selected-hovered-border,
                @panelbar-header-selected-hovered-gradient
            );
        }

        // Selected Focus
        > .k-link.k-state-selected:focus,
        > .k-link.k-selected:focus,
        > .k-link.k-state-selected.k-state-focus,
        > .k-link.k-state-selected.k-focus,
        > .k-link.k-selected.k-state-focus,
        > .k-link.k-state-selected.k-state-focused,
        > .k-link.k-selected.k-state-focused,
        > .k-link.k-selected.k-focus {
            .fill(
                @panelbar-header-selected-focused-text,
                @panelbar-header-selected-focused-bg,
                @panelbar-header-selected-focused-border,
                @panelbar-header-selected-focused-gradient
            );
        }

        // Selected Focus & Hover
        > .k-link.k-state-selected:hover:focus,
        > .k-link.k-selected:hover:focus,
        > .k-link.k-state-selected.k-state-hover.k-state-focus,
        > .k-ink.k-select.k-hover.k-focus {
            .fill(
                @panelbar-header-selected-hovered-focused-text,
                @panelbar-header-selected-hovered-focused-bg,
                @panelbar-header-selected-hovered-focused-border,
                @panelbar-header-selected-hovered-focused-gradient
            );
        }
    }

    // Content
    .k-panelbar-content {
        .fill(
            @panelbar-header-text,
            @panelbar-header-bg,
            @panelbar-header-border,
            @panelbar-header-gradient
        );
    }


    // Sub
    .k-group,
    .k-panelbar-group {

        // Hover
        > .k-item > .k-link:hover,
        > .k-item > .k-link.k-state-hover,
        > .k-item > .k-link.k-hover,
        > .k-panelbar-item > .k-link:hover,
        > .k-panelbar-item > .k-link.k-state-hover,
        > .k-panelbar-item > .k-link.k-hover {
            .fill(
                @panelbar-item-hovered-text,
                @panelbar-item-hovered-bg,
                @panelbar-item-hovered-border,
                @panelbar-item-hovered-gradient
            );
        }

        // Focus
        > .k-item > .k-link:focus,
        > .k-item > .k-link.k-state-focus,
        > .k-item > .k-link.k-focus,
        > .k-item > .k-link.k-state-focused,
        > .k-panelbar-item > .k-link:focus,
        > .k-panelbar-item > .k-link.k-state-focus,
        > .k-panelbar-item > .k-link.k-state-focused,
        > .k-panelbar-item > .k-link.k-focus {
            .fill(
                @panelbar-item-focused-text,
                @panelbar-item-focused-bg,
                @panelbar-item-focused-border,
                @panelbar-item-focused-gradient
            );

            box-shadow: @panelbar-item-focused-shadow;
        }

        // Focus & Hover
        > .k-item > .k-link:focus:hover,
        > .k-item > .k-link.k-state-focus.k-state-hover,
        > .k-item > .k-link.k-focus.k-hover,
        > .k-panelbar-item > .k-link:focus:hover,
        > .k-panelbar-item > .k-link.k-state-focus.k-state-hover,
        > .k-panelbar-item > .k-link.k-focus.k-hover {
            .fill(
                @panelbar-item-hovered-focused-text,
                @panelbar-item-hovered-focused-bg,
                @panelbar-item-hovered-focused-border,
                @panelbar-item-hovered-focused-gradient
            );
        }

        // Selected
        > .k-item > .k-link.k-state-selected,
        > .k-item > .k-link.k-selected,
        > .k-panelbar-item > .k-link.k-state-selected,
        > .k-panelbar-item > .k-link.k-selected {
            .fill(
                @panelbar-item-selected-text,
                @panelbar-item-selected-bg,
                @panelbar-item-selected-border,
                @panelbar-item-selected-gradient
            );
            background-image: none;
        }

        // Selected Hover
        > .k-item > .k-link.k-state-selected:hover,
        > .k-item > .k-link.k-selected:hover,
        > .k-item > .k-link.k-state-selected.k-state-hover,
        > .k-item > .k-link.k-selected.k-hover,
        > .k-panelbar-item > .k-link.k-state-selected:hover,
        > .k-panelbar-item > .k-link.k-selected:hover,
        > .k-panelbar-item > .k-link.k-selected.k-hover {
            .fill(
                @panelbar-item-selected-hovered-text,
                @panelbar-item-selected-hovered-bg,
                @panelbar-item-selected-hovered-border,
                @panelbar-item-selected-hovered-gradient
            );
        }

        // Selected Focus
        > .k-item > .k-link.k-state-selected:focus,
        > .k-item > .k-link.k-selected:focus,
        > .k-item > .k-link.k-state-selected.k-state-focus,
        > .k-item > .k-link.k-selected.k-focus,
        > .k-item > .k-link.k-state-selected.k-state-focused,
        > .k-panelbar-item > .k-link.k-state-selected:focus,
        > .k-panelbar-item > .k-link.k-selected:focus,
        > .k-panelbar-item > .k-link.k-state-selected.k-state-focus,
        > .k-panelbar-item > .k-link.k-selected.k-focus,
        > .k-item > .k-link.k-selected.k-focus {
            .fill(
                @panelbar-item-selected-focused-text,
                @panelbar-item-selected-focused-bg,
                @panelbar-item-selected-focused-border,
                @panelbar-item-selected-focused-gradient
            );
        }

        // Selected Focus & Hover
        > .k-item > .k-link.k-state-selected:focus:hover,
        > .k-item > .k-link.k-selected:focus:hover,
        > .k-item > .k-link.k-state-selected.k-state-focus.k-state-hover,
        > .k-item > .k-link.k-selected.k-focus.k-hover,
        > .k-item > .k-link.k-state-selected.k-state-focused.k-state-hover,
        > .k-item > .k-link.k-selected.k-focus.k-hover,
        > .k-panelbar-item > .k-link.k-state-selected:focus:hover,
        > .k-panelbar-item > .k-link.k-selected:focus:hover,
        > .k-panelbar-item > .k-link.k-state-selected.k-state-focus.k-state-hover,
        > .k-panelbar-item > .k-link.k-selected.k-focus.k-hover {
            .fill(
                @panelbar-item-selected-hovered-focused-text,
                @panelbar-item-selected-hovered-focused-bg,
                @panelbar-item-selected-hovered-focused-border,
                @panelbar-item-selected-hovered-focused-gradient
            );
        }
    }

}
