/*!
 * ---------------------------------------------------------------------
 *
 * 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/>.
 *
 * ---------------------------------------------------------------------
 */

 textarea:not(.form-control), input:not(.submit):not(.form-control):not([type=submit]):not([type=color]):not([type=reset]):not([type=checkbox]):not([type=radio]):not(.select2-search__field):not(.numInput):not(.tox-textfield) {
   color: var(--tblr-body-color);
   background-color: var(--tblr-bg-forms);
   background-clip: padding-box;
   border: var(--tblr-border-width) solid var(--tblr-border-color);
   border-radius: 4px;
   padding: 0.375rem 0.75rem;

   &:focus {
      border-color: $input-focus-border-color;
   }

   &:required:not(:valid) {
      border: 1px rgba(255, 0, 0, 0.6) solid !important;
      border-left-width: 3px !important;
   }
}

select:not(.form-select) {
   font-size: 1rem;
   color: var(--tblr-body-color);
   background-color: var(--tblr-bg-forms);
   background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='var(--tblr-gray-800)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/></svg>");
   background-repeat: no-repeat;
   background-position: right 0.75rem center;
   background-size: 16px 12px;
   appearance: none;
   border: var(--tblr-border-width) solid var(--tblr-border-color);
   border-radius: 4px;
   padding: 0.375rem 0.75rem;

   &:focus {
      border-color: $input-focus-border-color;
      outline: 0;
   }

   &[multiple],
   &[size]:not([size="1"]) {
     padding-right: 0.75rem;
     background-image: none;
   }

   &:disabled {
     background-color: var(--tblr-secondary-bg);
   }
}

input.submit,
.vsubmit {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   white-space: nowrap;
   background-color: var(--tblr-primary);
   color: var(--tblr-primary-fg);
   border: var(--tblr-border-width) solid var(--tblr-border-color);
   border-radius: 4px;
   line-height: 1.5;
   padding: 0.375rem 0.75rem;

   &:hover {
      background: color-mix(in srgb, var(--tblr-primary), black 10%);
      border-color: var(--tblr-primary);
   }

   &.disabled {
      cursor: not-allowed;
   }

   &:focus:not([disabled]):not(.disabled) {
      border-color: var(--tblr-primary);
   }
}

.form-control.warn {
   border-color: rgb(255, 0, 0) !important;
   background-color: rgba(255, 0, 0, 0.1) !important;
}

.form-control.not_expired {
   border-color: #a1cf66 !important;
   background-color: rgba(6, 255, 0, 0.1) !important;
}
.form-control.soon_expired {
   border-color: #de5d06 !important;
   background-color: rgba(255, 184, 0, 0.1) !important;
}
.form-control.expired {
   border-color: #d63939 !important;
   background-color: rgba(255, 0, 0, 0.1) !important;
}
.form-control[readonly] {
   opacity: 0.7;
   background-color: rgba(var(--tblr-body-color-rgb), 0.1);
   cursor: not-allowed;
}