/*!
 * ---------------------------------------------------------------------
 *
 * GLPI - Gestionnaire Libre de Parc Informatique
 *
 * http://glpi-project.org
 *
 * @copyright 2015-2026 Teclib' and contributors.
 * @copyright 2003-2014 by the INDEPNET Development Team.
 * @licence   https://www.gnu.org/licenses/gpl-3.0.html
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 * ---------------------------------------------------------------------
 */

:root[data-glpi-theme-dark="1"] {
    --tblr-dark: #000;
    --tblr-light: #e6e6e6;
    --tblr-info: #5885c0;
    --tblr-body-bg: #000;
    --tblr-body-color: #e6e6e6;
    --tblr-body-color-rgb: 230, 230, 230;
    --tblr-bg-surface: color-mix(in srgb, var(--tblr-body-bg), black 2%);
    --tblr-border-color: color-mix(in srgb, var(--tblr-body-bg), white 33.33%);
    --tblr-gray-100: var(--tblr-dark);
    --tblr-gray-200: color-mix(in srgb, var(--tblr-dark), var(--tblr-light) 2%);
    --tblr-gray-300: color-mix(in srgb, var(--tblr-dark), var(--tblr-light) 6%);
    --tblr-gray-400: color-mix(in srgb, var(--tblr-dark), var(--tblr-light) 12%);
    --tblr-gray-500: color-mix(in srgb, var(--tblr-dark), var(--tblr-light) 22%);
    --tblr-gray-600: color-mix(in srgb, var(--tblr-dark), var(--tblr-light) 40%);
    --tblr-gray-700: color-mix(in srgb, var(--tblr-dark), var(--tblr-light) 64%);
    --tblr-gray-800: color-mix(in srgb, var(--tblr-dark), var(--tblr-light) 84%);
    --tblr-gray-900: var(--tblr-light);
    --tblr-gray-50: var(--tblr-gray-300);
    --glpi-tabs-active-bg: color-mix(in srgb, var(--tblr-bg-surface), white 10%);
    --glpi-tabs-border-color: transparent;
    --glpi-scrollbar-thumb-color: color-mix(in srgb, var(--tblr-secondary), transparent 75%);
    --glpi-timeline-itil-content-bg: #212221d3;
    --glpi-timeline-itil-content-fg: #85bd81;
    --glpi-timeline-itil-content-border-color: #1d201db4;
    --glpi-timeline-fup-bg: #222;
    --glpi-timeline-fup-fg: #acacac;
    --glpi-timeline-fup-border-color: #3b3b3b;
    --glpi-timeline-task-bg: #2722172f;
    --glpi-timeline-task-fg: #ccb686;
    --glpi-timeline-task-border-color: #363532;
    --glpi-timeline-solution-bg: #3a4d55;
    --glpi-timeline-solution-fg: #89bfd3;
    --glpi-timeline-solution-border-color: #435963;
    --glpi-timeline-document-bg: #2b4137;
    --glpi-timeline-document-fg: #68b997;
    --glpi-timeline-badge-bg: rgb(104, 104, 104, 15%);
    --glpi-timeline-badge-fg: rgb(236, 236, 236, 80%);
    --glpi-badge-bg: color-mix(in srgb, var(--tblr-link-color), var(--tblr-dark) 85%);
    --glpi-illustrations-background: rgb(204, 204, 204);
    --glpi-illustrations-primary: hsl(from var(--tblr-primary) h s 65);
    --glpi-illustrations-header-dark: hsl(from var(--glpi-illustrations-background) h s 30);
    --glpi-illustrations-header-light: hsl(from var(--glpi-illustrations-background) h s 50);

    .navbar-nav.user-menu .bg-red-lt {
        background-color: rgb(214, 57, 57, 20%) !important
    }

    // missing border (TODO open a pr upstream ?)
    .form-check-input:not(:checked),
    .form-select,
    .form-file-text,
    .form-control,
    .form-selectgroup-label,
    .form-selectgroup-check,
    .form-imagecheck-figure::before {
        border-color: var(--tblr-border-color);
    }

    .card {
        border: 1px solid var(--tblr-border-color);
    }

    input[type="color"] {
        background-color: transparent;
    }

    .table-danger {
        --tblr-table-bg: #642b2b;
        --tblr-table-striped-bg: #642b2b;
        --tblr-table-striped-color: var(--tblr-light);
        --tblr-table-active-bg: #642b2b;
        --tblr-table-active-color: var(--tblr-light);
        --tblr-table-hover-bg: #642b2b;
        --tblr-table-hover-color: var(--tblr-light);

        color: var(--tblr-light);
        border-color: #6d000a;
    }

    .search_page .search-container .search-card .search-results.deleted-results td {
        color: var(--tblr-light);
    }

    .navbar-collapsed {
        #navbar-menu {
            .nav-item {
                .nav-link {
                    & + .dropdown-menu {
                        background-color: var(--tblr-bg-surface) !important;
                        color: var(--glpi-mainmenu-fg) !important;
                    }
                }
            }
        }
    }

    .page-anonymous {
        .glpi-logo {
            --logo: var(--glpi-logo-light-login) !important;
        }
    }

    .qtip-bootstrap,
    .popover .popover-body {
        background-color: var(--tblr-bg-surface) !important;
        color: var(--tblr-light) !important;
    }

    .popover .popover-arrow::after {
        border-top-color: var(--tblr-bg-surface) !important;
    }

    iframe.tox-edit-area__iframe {
        background-color: var(--tblr-bg-surface) !important;
    }

    .search_page .search-container .search-card .search-header .search-controls {
        .btn-active-search {
            background-color: #cff5d129;
            color: #cff5d1;
        }

        .btn-active-sort {
            background-color: #ffe0cc2e;
            color: #ffe0cc;
        }
    }

    .avatar {
        color: var(--tblr-dark);
    }

    .list-group {
        --tblr-list-group-action-active-bg: rgb(var(--tblr-secondary-rgb), 0.5);
    }
}
