body {
    .ui-panel {
        padding: 0;

        .ui-panel-titlebar {
            border: 0 none;
            padding: $headerPadding;
            @include border-radius-top(2px);
            @include border-radius-bottom(0);

            .ui-panel-title {
                margin: 0;
                line-height: $panelContentLineHeight;
            }

            .ui-panel-titlebar-icon {
                position: relative;
                width: 1.5em;
                height: 1.5em;
                line-height: 1.5em;
                text-align: center;
                color: $headerTextColor;
                margin: 0;
                @include transition(background-color $transitionDuration);
                @include border-radius(50%);

                &:hover {
                    background-color: $primaryLightColor;
                }
            }
        }

        .ui-panel-content {
            height: 100%;
            box-sizing: border-box;
            padding: $contentPadding;
            line-height: $panelContentLineHeight;
        }

        .ui-panel-footer {
            padding: $headerPadding;
            border: 0 none;
            border-top: 1px solid $dividerColor;
            margin: 0;
        }
    }

    .ui-fieldset {
        padding: $contentPadding;

        .ui-fieldset-legend {
            padding: $headerPadding;
            padding-left: 2px;
            padding-right: 8px;
            color: $primaryColor;

            .ui-fieldset-toggler {
                width: 2em;
                height: 2em;
                padding: .5em;
                background-color: $primaryColor;
                color: #ffffff;
                font-size: 1.5em;
                @include border-radius(50%);
                @include transition(background-color $transitionDuration);
                margin-top: -10px;
                margin-right: 8px;
                @include content-shadow();
                @include rippleitem();

                &:hover {
                    background-color: $primaryDarkColor;
                }
            }
            a {
                &:focus {
                    background-color: transparent;
                    outline: 0;
                }
            }

            .ui-fieldset-legend-text {
                color: $primaryColor;
            }
        }
    }

    .ui-accordion {
        .ui-accordion-header {
            margin-top: .25em;
            background-color: $accordionHeaderBgColor;
            color: $accordionHeaderTextColor;
            font-weight: $headerFontWeight;
            @include border-radius($borderRadius);
            @include transition(background-color $transitionDuration);

            > a {
                padding: $headerPadding;
                color: $accordionHeaderTextColor;

                .ui-accordion-toggle-icon,
                .ui-accordion-header-text {
                    vertical-align: middle;
                }
            }

            &:not(.ui-state-active):not(.ui-state-disabled):hover {
                background-color: $accordionHeaderHoverBgColor;
                color: $accordionHeaderHoverTextColor;
            }

            &.ui-state-active {
                background-color: $accentColor;
                color: $accentTextColor;
                @include border-radius-bottom(0);

                > a {
                    color: $accentTextColor;
                }

                .ui-accordion-toggle-icon {
                    color: $accentTextColor;
                }
            }
        }

        .ui-accordion-content {
            padding: $contentPadding;
            line-height: $panelContentLineHeight;
            margin-top: 0;
            @include border-radius-bottom($borderRadius);
        }
    }

    .ui-toolbar {
        background-color: $primaryDarkColor;
        @include content-shadow();
        padding: 10px;

        .ui-toolbar-separator {
            margin-right: 0.25em;
        }
    }

    .ui-tabview {
        padding: 0;
        border: 0 none;

        .ui-tabview-nav {
            background-color: #ffffff;
            border: 0 none;
            @include border-radius(0);

            > li {
                padding: 0;
                overflow: hidden;
                @include transition(border-color $transitionDuration);

                > a {
                    cursor: pointer;
                    padding: $headerPadding;

                    &:focus {
                        outline: 0 none;
                    }
                }

                > .pi-times {
                    margin: .5em 0 0 0;
                    @include transition(color $transitionDuration);
                    color: $textSecondaryColor;
                }

                &.ui-state-default {
                    a {
                        color: $textSecondaryColor;
                    }
                }

                &:not(.ui-state-active):not(.ui-state-disabled):hover {
                    background-color: #ffffff;
                }

                &.ui-state-active {
                    background-color: transparent;
                    border-color: $accentColor;
                    border-style: solid;

                    a {
                        color: $primaryColor;
                    }

                    .ui-tabview-left-icon, .ui-tabview-right-icon {
                        color: $primaryColor;
                    }

                    > .pi-times {
                        color: $accentColor;
                    }
                }

                &.ui-tabview-outline {
                    outline: 0 none;
                    border-color: $primaryLightColor;
                }

                .ui-tabview-left-icon, .ui-tabview-right-icon {
                    color: $textSecondaryColor;
                    display: inline-block;
                    vertical-align: middle;
                    font-size: $iconFontSize;
                }

                .ui-tabview-title {
                    line-height: 1.5em;
                    vertical-align: middle;
                }
            }
        }

        .ui-tabview-panel {
            padding: $contentPadding;
            line-height: $panelContentLineHeight;
        }

        &.ui-tabview-top {
            > .ui-tabview-nav {
                padding: 0;
                margin: 0;
                @include border-radius-top(4px);
                border-bottom: 1px solid $dividerColor;

                > li {
                    border-style: solid;
                    border-width: 0 0 2px 0;
                }
            }
        }

        &.ui-tabview-bottom {
            > .ui-tabview-nav {
                padding: 0;
                margin: 0;
                @include border-radius-bottom(4px);
                border-top: 1px solid $dividerColor;

                > li {
                    border-width: 2px 0 0 0;
                }
            }
        }

        &.ui-tabview-left {
            > .ui-tabview-nav {
                padding: 0;
                margin: 0;
                @include border-radius-left(4px);
                border-right: 1px solid $dividerColor;

                > li {
                    box-sizing: border-box;
                    border-width: 0 2px 0 0;

                    > a {
                        width: 100%;
                        box-sizing: border-box;
                    }
                }
            }
        }

        &.ui-tabview-right {
            > .ui-tabview-nav {
                padding: 0;
                @include border-radius-right(4px);
                border-left: 1px solid $dividerColor;

                > li {
                    box-sizing: border-box;
                    border-width: 0 0 0 2px;

                    > a {
                        width: 100%;
                        box-sizing: border-box;
                    }

                    &.ui-state-active {
                        > a {
                            padding-left: 0.875em;
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 640px) {
    body {
        .ui-toolbar {
            .ui-toolbar-group-right {
                margin-top: 1em;
            }
        }
    }
}
