/* DS5 - identidade visual do WebClient do SFTPGo (verde do logo DS5 Sistemas: #18B250) */

/* tema claro: verde um pouco mais escuro que o do logo, para o texto branco dos botoes ter contraste */
:root,
[data-bs-theme="light"] {
  --ds5-green: #12933F;
  --ds5-green-rgb: 18, 147, 63;
  --ds5-green-active: #0F7D35;
  --ds5-green-light: #E7F6EC;

  --bs-primary: var(--ds5-green);
  --bs-primary-rgb: var(--ds5-green-rgb);
  --bs-primary-active: var(--ds5-green-active);
  --bs-primary-light: var(--ds5-green-light);
  --bs-primary-clarity: rgba(18, 147, 63, 0.2);
  --bs-primary-bg-subtle: #D0EDDA;
  --bs-primary-border-subtle: #A2DBB5;
  --bs-primary-text-emphasis: #073B19;
  --bs-text-primary: var(--ds5-green);
  --bs-link-color: var(--ds5-green);
  --bs-link-color-rgb: var(--ds5-green-rgb);
  --bs-link-hover-color: var(--ds5-green-active);
  --bs-link-hover-color-rgb: 15, 125, 53;
}

/* tema escuro: o verde do proprio logo */
[data-bs-theme="dark"] {
  --ds5-green: #18B250;
  --ds5-green-rgb: 24, 178, 80;
  --ds5-green-active: #22C55E;
  --ds5-green-light: #12251A;

  --bs-primary: var(--ds5-green);
  --bs-primary-rgb: var(--ds5-green-rgb);
  --bs-primary-active: var(--ds5-green-active);
  --bs-primary-light: var(--ds5-green-light);
  --bs-primary-clarity: rgba(24, 178, 80, 0.2);
  --bs-primary-bg-subtle: #0B2213;
  --bs-primary-border-subtle: #1A5A30;
  --bs-primary-text-emphasis: #8BDCA8;
  --bs-text-primary: var(--ds5-green);
  --bs-link-color: var(--ds5-green);
  --bs-link-color-rgb: var(--ds5-green-rgb);
  --bs-link-hover-color: var(--ds5-green-active);
  --bs-link-hover-color-rgb: 34, 197, 94;
}

/* componentes (paginacao, menus, switches) usam variaveis proprias com o azul fixo */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
  --bs-component-active-bg: var(--bs-primary);
  --bs-component-checked-bg: var(--bs-primary);
  --bs-component-hover-color: var(--bs-primary);
  --bs-menu-link-color-active: var(--bs-primary);
  --bs-menu-link-color-here: var(--bs-primary);
  --bs-menu-link-color-hover: var(--bs-primary);
  --bs-menu-link-color-show: var(--bs-primary);
}
.nav-pills {
  --bs-nav-pills-link-active-bg: var(--bs-primary);
}

/* checkboxes, radios e foco usam cores fixas no tema original */
.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}
.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.6);
}

/* logo: o arquivo configurado (ds5-logo.png) tem texto branco, para fundo escuro.
   Onde o fundo e claro, troca pela versao grafite; o menu lateral e escuro nos dois temas */
[data-bs-theme="light"] img[alt="Logo"] {
  content: url("ds5-logo-escuro.png");
}
[data-bs-theme="light"] .app-sidebar img[alt="Logo"] {
  content: url("ds5-logo.png");
}

/* telas de login: logo um pouco maior e faixa verde no topo do cartao */
.app-blank img[alt="Logo"] {
  height: 64px !important;
  width: auto;
}
.app-blank .bg-body.rounded.shadow-sm {
  border-top: 5px solid var(--ds5-green);
}
