window#powermenu,
window#verification {
    // the fraction has to be more than hyprland ignorealpha
    background-color: rgba(0, 0, 0, 0.4);
}

$popover-padding: 0.6rem * 1.6;

window#verification .verification {
    * {
        font-size: $font-size * $bar-menus-menu-dashboard-confirmation_scaling * 0.01;
    }

    @include floating-widget;
    background: if(
        $bar-menus-monochrome,
        $bar-menus-background,
        $bar-menus-menu-dashboard-powermenu-confirmation-background
    );
    border: $bar-menus-border-size solid
        if($bar-menus-monochrome, $bar-menus-border-color, $bar-menus-menu-dashboard-powermenu-confirmation-border);
    padding: 0.35em * 1.6 * 1.5;
    min-width: 20em;
    min-height: 6em;
    opacity: $bar-menus-opacity * 0.01;

    .verification-content {
        background: if($bar-menus-monochrome, $bar-menus-cards, $bar-menus-menu-dashboard-powermenu-confirmation-card);
        border-radius: $bar-menus-border-radius * 0.5;
        padding: 1em;
    }

    .text-box {
        margin-bottom: 0.3em;

        .title {
            font-size: 1.5em;
            color: if($bar-menus-monochrome, $bar-menus-label, $bar-menus-menu-dashboard-powermenu-confirmation-label);
            margin-bottom: 0.5em;
        }

        .desc {
            color: if($bar-menus-monochrome, $bar-menus-text, $bar-menus-menu-dashboard-powermenu-confirmation-body);
            font-size: 1em;
            margin-bottom: 0.55em;
            padding: 1em 3em;
        }
    }

    .verification-button {
        background: $bar-menus-buttons-default;
        padding: 0.7em 0em;
        margin: 0.4em 1.7em;
        border-radius: $bar-menus-border-radius * 0.5;
        opacity: 1;
        transition: border-color 0.2s ease-in-out;
        transition: opacity 0.3s ease-in-out;

        &.bar-verification_yes {
            background-color: if(
                $bar-menus-monochrome,
                $bar-menus-buttons-default,
                $bar-menus-menu-dashboard-powermenu-confirmation-confirm
            );
        }

        &.bar-verification_no {
            background-color: if(
                $bar-menus-monochrome,
                $bar-menus-buttons-default,
                $bar-menus-menu-dashboard-powermenu-confirmation-deny
            );
        }

        &:hover {
            &.bar-verification_yes {
                background-color: transparentize(
                    if(
                        $bar-menus-monochrome,
                        $bar-menus-buttons-default,
                        $bar-menus-menu-dashboard-powermenu-confirmation-confirm
                    ),
                    0.6
                );
                transition: background-color 0.2s ease-in-out;
            }

            &.bar-verification_no {
                background-color: transparentize(
                    if(
                        $bar-menus-monochrome,
                        $bar-menus-buttons-default,
                        $bar-menus-menu-dashboard-powermenu-confirmation-deny
                    ),
                    0.6
                );
                transition: background-color 0.2s ease-in-out;
            }
        }

        &:focus {
            &.bar-verification_yes {
                background-color: transparentize(
                    if(
                        $bar-menus-monochrome,
                        $bar-menus-buttons-default,
                        $bar-menus-menu-dashboard-powermenu-confirmation-confirm
                    ),
                    0.6
                );
                transition: background 0.2s ease-in-out;
            }

            &.bar-verification_no {
                background-color: transparentize(
                    if(
                        $bar-menus-monochrome,
                        $bar-menus-buttons-default,
                        $bar-menus-menu-dashboard-powermenu-confirmation-deny
                    ),
                    0.6
                );
                transition: background 0.2s ease-in-out;
            }
        }

        &:active {
            &.bar-verification_yes {
                background-color: transparentize(
                    if(
                        $bar-menus-monochrome,
                        $bar-menus-buttons-default,
                        $bar-menus-menu-dashboard-powermenu-confirmation-confirm
                    ),
                    0.6
                );
                transition: background 0.2s ease-in-out;
            }

            &.bar-verification_no {
                background-color: transparentize(
                    if(
                        $bar-menus-monochrome,
                        $bar-menus-buttons-default,
                        $bar-menus-menu-dashboard-powermenu-confirmation-deny
                    ),
                    0.6
                );
                transition: background 0.2s ease-in-out;
            }

            image {
                opacity: 0.3;
                transition: opacity 0.3s ease-in-out;
            }

            label {
                opacity: 0.3;
                transition: opacity 0.3s ease-in-out;
            }
        }
    }

    .bar-verification_no label {
        color: if(
            $bar-menus-monochrome,
            $bar-menus-buttons-text,
            $bar-menus-menu-dashboard-powermenu-confirmation-button_text
        );
    }

    .bar-verification_yes label {
        color: if(
            $bar-menus-monochrome,
            $bar-menus-buttons-text,
            $bar-menus-menu-dashboard-powermenu-confirmation-button_text
        );
    }
}

window#powermenu .powermenu {
    @include floating-widget;

    &.line {
        padding: $popover-padding * 1.5;
    }

    &.box {
        padding: $popover-padding * 2;
    }
}

.widget-button {
    border-color: $crust;
    min-width: 4.5em;
    min-height: 4.5em;
    opacity: 1;
    transition: border-color 0.2s ease-in-out;
    transition: opacity 0.3s ease-in-out;

    &:hover {
        &.powermenu-button-shutdown {
            border-color: $red;
        }

        &.powermenu-button-logout {
            border-color: $green;
        }

        &.powermenu-button-sleep {
            border-color: $sky;
        }

        &.powermenu-button-reboot {
            border-color: $peach;
        }
    }

    &:focus {
        &.powermenu-button-shutdown {
            border-color: $red;
        }

        &.powermenu-button-logout {
            border-color: $green;
        }

        &.powermenu-button-sleep {
            border-color: $sky;
        }

        &.powermenu-button-reboot {
            border-color: $peach;
        }
    }

    &:active {
        &.powermenu-button-shutdown {
            border-color: rgba($red, 0.5);
        }

        &.powermenu-button-logout {
            border-color: rgba($green, 0.5);
        }

        &.powermenu-button-sleep {
            border-color: rgba($sky, 0.5);
        }

        &.powermenu-button-reboot {
            border-color: rgba($peach, 0.5);
        }
    }
}

.system-button_icon {
    font-size: 3em;

    &.shutdown {
        color: $red;
    }

    &.logout {
        color: $green;
    }

    &.reboot {
        color: $peach;
    }

    &.sleep {
        color: $sky;
    }
}

.system-button_label {
    &.shutdown {
        color: $red;
    }

    &.logout {
        color: $green;
    }

    &.reboot {
        color: $peach;
    }

    &.sleep {
        color: $sky;
    }
}
