body {
    .ui-overlaypanel {
        @include overlay-shadow();

        .ui-overlaypanel-close {
            background-color: $headerBgColor;
            color: $headerIconColor;
            width: 1.5em;
            height: 1.5em;
            text-align: center;
            @include transition(background-color $transitionDuration);

            &:hover {
                color: darken($headerIconHoverColor, 10%);
            }

            .pi {
                position: absolute;
                left: 50%;
                top: 50%;
                width: 1em;
                height: 1em;
                margin-top: -.5em;
                margin-left: -.5em;
            }
        }

        &:after {
            border-color: rgba($contentBgColor, 0);
            border-bottom-color: $contentBgColor;
        }

        &:before {
            border-color: rgba($contentBorderColor, 0);
            border-bottom-color: $contentBorderColor;
        }

        &.ui-overlaypanel-flipped {
            &:after {
                border-top-color: $contentBgColor;
            }

            &:before {
                border-top-color: $contentBorderColor;
            }
        }
    }

    .ui-dialog {
        @include overlay-shadow();

        .ui-dialog-titlebar {
            padding: $headerPadding;

            .ui-dialog-title {
                margin: 0;
                float: none;
            }

            .ui-dialog-titlebar-icon {
                color: $headerIconColor;
                border: 0 none;
                @include transition(color $transitionDuration);
                padding: 0;
                margin-left: .35em;
                font-size: $fontSize + 2;

                &:hover {
                    color: darken($headerIconHoverColor, 10%);
                }
            }
        }

        .ui-dialog-content {
            padding: $contentPadding;
        }

        .ui-dialog-buttonpane {
            padding: $headerPadding;
            text-align: right;

            button {
                margin: 0 .35em 0 0;
            }
        }

        .ui-dialog-footer {
            border: 0 none;
            border-top: 1px solid $contentBorderColor;
        }

        &.ui-confirm-dialog {
            .ui-dialog-content {
                padding: 1.5em;

                > span {
                    float: none;
                    display: inline-block;
                    vertical-align: middle;
                    line-height: $fontSize;
                    margin: 0;

                    &.ui-icon {
                        margin-right: .35em;
                        font-size: $fontSize + 2;
                    }
                }
            }
        }
    }

    .ui-tooltip {
        .ui-tooltip-text {
            @include overlay-shadow();
        }

        &.ui-state-error {
            border: 0 none;
        }
    }

    .ui-lightbox {
        @include overlay-shadow();

        .ui-lightbox-caption {
            padding: $headerPadding;

            .ui-lightbox-caption-text {
                color: $headerTextColor;
                margin: 0;
            }

            .ui-lightbox-close {
                padding: 0;
                color: $headerTextColor;
                @include transition(color .3s);

                &:hover {
                    color: $primaryColor;
                }
            }
        }

        .ui-lightbox-content-wrapper {
            overflow: hidden;

            .ui-lightbox-nav-left {
                @include transition(all .3s);
                font-size: 24px;
                margin-left: 4px;

                &:hover {
                    @include scale(1.2);
                }
            }

            .ui-lightbox-nav-right {
                @include transition(all .3s);
                font-size: 24px;
                margin-right: 4px;

                &:hover {
                    @include scale(1.2);
                }
            }

            .ui-lightbox-content.ui-lightbox-loading + a {
                display: none;
            }
        }
    }
}
