/* UnitLMS look for the accounting (ERPNext) sites. Linked into every page by the web
   server in front of the sites (host/erp-certs.sh), so one file brands all institutions.
   Palette = the LMS's own: teal #00666e, deep teal #004f55, gold accent #e9a324. */
:root,
[data-theme="light"] {
  --primary: #00666e;
  --primary-color: #00666e;
  --btn-primary: #00666e;
  --brand-color: #00666e;
  --border-primary: #00666e;
  --blue-500: #1d9ca8;
  --blue-600: #00666e;
  --sidebar-select-color: #e3f1f2;
  --unitlms-teal-dark: #004f55;
  --unitlms-gold: #e9a324;
}

/* ERPNext 16's solid buttons ("Continue", "Open Chart of Accounts"...) read their colours
   from these per-component variables rather than --primary */
.es-button {
  --bt-solid-bg: var(--primary);
  --bt-solid-bg-hover: var(--unitlms-teal-dark);
  --bt-solid-bg-active: #003940;
  --bt-solid-fg: #ffffff;
}
.es-button[data-variant="solid"] { background: var(--primary); color: #fff; }
.es-button[data-variant="solid"]:hover { background: var(--unitlms-teal-dark); }

/* links and primary actions */
a:not(.btn):not(.dropdown-item):hover { color: var(--unitlms-teal-dark); }
.btn-primary,
.btn.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--unitlms-teal-dark) !important;
  border-color: var(--unitlms-teal-dark) !important;
}
.form-control:focus,
.frappe-control input:focus,
.frappe-control select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(0, 102, 110, 0.18) !important;
}

/* selected item in the sidebar / workspace tabs, with a gold marker like the LMS */
.desk-sidebar .sidebar-item-container.active-sidebar,
.standard-sidebar-item.selected {
  box-shadow: inset 3px 0 0 var(--unitlms-gold);
}

/* the logo is wide ("Unit LMS" wordmark): give it room in the navbar and on the login card */
.navbar-brand img,
.navbar .app-logo,
.app-logo img {
  height: 26px !important;
  max-height: 26px;
  width: auto !important;
}
html body .page-card-head img.app-logo,
html body .for-login .page-card-head img.app-logo,
html body .page-card .page-card-head .app-logo {
  height: 52px !important;
  max-height: none !important;
  min-height: 0 !important;
  width: auto !important;
  max-width: 100% !important;
}
.page-card-head .app-logo,
.page-card-head h4 { color: var(--unitlms-teal-dark); }

/* Frappe HR employee app: keep it to what the HR admin has set up. Until they switch on
   "Allow employee check-in from mobile app" (HR Settings), staff only see leave, expenses,
   advances and payslips - not attendance or shift requests, which need shift types and
   attendance rules set up first. brand.js sets data-unitlms-attendance="on" once enabled. */
html:not([data-unitlms-attendance="on"]) a[href*="/hrms/attendance-requests"],
html:not([data-unitlms-attendance="on"]) a[href*="/hrms/shift-requests"],
html:not([data-unitlms-attendance="on"]) ion-tab-button#tab-button-Attendance {
  display: none !important;
}
