/*
Discord Extreme List - Discord's unbiased list.

Copyright (C) 2020-2025 Carolina Mitchell, John Burke, Advaith Jagathesan

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

@charset "UTF-8";

@use "./colours.scss" as cc;
@use "../../../node_modules/bulma/sass/utilities/derived-variables.scss" as bulma;
@use "../../../node_modules/bulma/sass/utilities/functions.scss" as functions;

html[data-theme=dark] {
    --del-text: #fff;
    --del-primary-invert: #fff;
    --del-primary-invert-l: 100%;
    --del-navbar-dropdown-item-color-l: 100%;
    --delovr-navbar-colour: #fff;
}

html[data-theme=light] {
    --delovr-navbar-colour: #000;
}

html[data-deltheme=black] {
    --delovr-primary-colour: cc.$primary-black;
}

html[data-deltheme=dark] {
    --delovr-primary-colour: cc.$primary-dark;
}

html[data-deltheme=light] {
    --delovr-primary-colour: cc.$primary-light;
}

.modal-card-head {
    box-shadow: unset !important;
    background-color: var(--del-modal-card-foot-background-color) !important;
}

.navbar-item, .navbar-link {
    gap: unset !important;
}

.button.is-outlined:hover {
    --del-button-border-width: max(1px, 0.0625em) !important;
    --del-button-outer-shadow-alpha: unset !important;
}

img.nsfw {
    filter: blur(5px);
    backdrop-filter: blur(5px);
}

img.nsfw:hover {
    filter: unset;
    backdrop-filter: unset;
}

.has-text-shadow-blue {
    color: #a8b9bf;
}

.button {
    &.is-outlined:not(.is-loading):not(.is-default) {
        &:hover,
        &:focus {
            background-color: var(--button-background, currentColor) !important;
            border-color: var(--button-border, currentColor) !important;
            color: var(--button-hover-color, #fff) !important;
        }
    
        // Handle Bulma's default colors
        @each $name, $color in bulma.$colors {
            &.is-#{$name} {
                --button-background: #{$color};
                --button-border: #{$color};
                --button-hover-color: #{functions.bulmaFindColorInvert($color)};
            }
        }
    
        // Handle custom colors
        @each $name, $pair in cc.$custom-colors {
            &.is-#{$name} {
                --button-background: #{nth($pair, 1)};
                --button-border: #{nth($pair, 1)};
                --button-hover-color: #{nth($pair, 2)};

                // Add explicit hover state
                &:hover,
                &:focus {
                    background-color: #{nth($pair, 1)} !important;
                    border-color: #{nth($pair, 1)} !important;
                    color: #{nth($pair, 2)} !important;
                }
            }
        }
    }
}