/**
 * JCH Optimize - Performs several front-end optimizations for fast downloads
 *
 * @package   jchoptimize/wordpress-platform
 * @author    Samuel Marshall <samuel@jch-optimize.net>
 * @copyright Copyright (c) 2025 Samuel Marshall / JCH Optimize
 * @license   GNU/GPLv3, or later. See LICENSE file
 *
 * If LICENSE file missing, see <http://www.gnu.org/licenses/>.
 */

:root {
    --hue: 214;
    --success: #457d54;
    --danger: #c52827;
    --secondary: #495057;
    --gray-400: #cdcdcd;
}

.jch-dash-icons .dashicon-wrapper {
    --jch-dashicon-border-color: #D8DDE2;
}

.jch-dash-icons .dashicon-wrapper .dashicon {
    --jch-dashicon-text-color: #2271b1;
    --jch-dashicon-bg-color: #f0f6fc;
    --jch-dashicon-icon-color: #2271b1;
    --jch-dashicon-bg-color-hvr:#184f7c;
}

.jch-dash-icons .dashicon-wrapper.success .dashicon {
    --jch-dashicon-text-color: #457254;
    --jch-dashicon-bg-color: #f3f9f3;
    --jch-dashicon-icon-color: #55a258;
    --jch-dashicon-bg-color-hvr: #457254;
}

.jch-dash-icons .dashicon-wrapper.danger .dashicon {
    --jch-dashicon-text-color: #c52827;
    --jch-dashicon-bg-color: #f4f0f0;
    --jch-dashicon-icon-color: #ce8484;
    --jch-dashicon-bg-color-hvr: #c52827;
}

.jch-dash-icons .dashicon-wrapper.warning .dashicon {
    --jch-dashicon-text-color: #996900;
    --jch-dashicon-bg-color: #fffcf4;
    --jch-dashicon-icon-color: #ffb514;
    --jch-dashicon-bg-color-hvr: #996900;
}

.jch-dash-icons-switcher .form-check-input:checked {
    background-color: hsl(var(--hue), 30%, 40%);
    border-color: hsl(var(--hue), 30%, 40%);
}

.jch-dash-icons a {
    text-decoration: none;
}

.disabled {
    opacity: 0.4;
}

.jch-dash-icons-switcher .form-check.form-switch .form-check-input {
    margin: 0 0 0 -2.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,0.25%29'/%3e%3c/svg%3e");
    background-position: left center;
    background-repeat: no-repeat;

    &:checked {
        background-position: right center;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
        background-color: #2271b1;
        border-color: #2271b1;
        &::before {
            content: '';
            margin: 0;
            height: 0;
            width: 0;
        }
    }
}