@use 'variables.scss';

input[type=file],
input[type=file]::-webkit-file-upload-button {
  cursor: pointer;
}

.k-button-solid-base {
  background-color: transparent;
}

.k-widget,
.k-input,
.k-input:focus,
.k-button,
.k-chip-label,
.k-tooltip .k-tooltip-content {
  font-family: "Helvetica Neue", "Helvetica", "Arial", "sans-serif";
  font-size: 14px;
}

.k-button:not(.k-input-button):not(.k-icon-button) {
  line-height: 20px;
  padding: 4px 8px 4px 8px;
  border-radius: 4px;
}

.k-button.k-primary:not(.k-input-button):not(.k-icon-button) {
  background-image: none, linear-gradient(to bottom, rgba(255, 255, 255, .6) 0, rgba(255, 255, 255, 0) 100%);
}

.k-button .k-svg-icon {
  margin-bottom: 2px;
}

textarea.k-textarea {
  padding-left: 0.571em;
  line-height: 1.65em;
  height: 100%;
}

.k-treeview {
  border-radius: 4px;
  display: flex;
  flex-grow: 1;
  border-style: solid;
  border-width: 1px;
}

.k-input,
.k-dropdownlist {
  border-radius: 4px;
  height: 28px;
  min-height: 28px;
}

.k-input:focus,
.k-input:focus-within,
.k-dropdownlist:focus,
.k-dropdownlist:focus-within,
.k-switch:focus,
.k-switch:focus-within {
  z-index: 1;
}

.k-input.ng-invalid.ng-touched {
  box-shadow: 0 0 5px 1px variables.$medium-red;
}

.k-grid {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
  height: 100%;
  border: none;
}

.k-filter-menu .k-action-buttons.k-button-group>.k-button {
  border-start-start-radius: 4px;
  border-end-end-radius: 4px;
  border-start-end-radius: 4px;
  border-end-start-radius: 4px;
}

.k-input .k-input-inner {
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0;
}

.k-grid td,
.k-grid .k-grid-md td,
.k-grid .k-grid-md .k-table-td {
  padding: 6px;
}

.k-grid .k-grid-header,
.k-grid .k-grid-header .k-table-md {
  line-height: 15px;
}

.k-grid-header .k-header>.k-link {
  text-overflow: clip;
}

.k-grid .k-table-th.k-header.k-filterable,
.k-grid .k-table-th.k-header {
  padding-left: 3px;
  padding-right: 20px;
}

.k-grid .k-grid-header .k-header.k-filterable .k-grid-filter-menu {
  padding: 0;
  width: 24px;
}

.k-filtercell .k-filtercell-operator {
  display: flex;
}

.k-popup .k-header .k-dateinput-wrap {
  font-weight: normal;
}

.k-popup.k-list-container {
  min-width: 350px;
}

a.k-link,
a.k-link:hover {
  color: inherit;
}

.k-popup {
  padding: 0;
  margin: 0;
  border-width: 2px;
  border-radius: 4px;
}

.k-popup.k-menu-popup .k-context-menu {
  border: none;
  font-size: 14px;
  font-weight: normal;
  border-radius: 3px;
  min-width: 100px;
}

.k-popup.k-menu-popup {
  border-radius: 4px;
}

.k-popup.k-menu-popup .k-group.k-menu-group {
  border-radius: 3px;
}

.k-menu-popup .k-menu-item .k-menu-link {
  padding: 0;
}

div.k-i-loading-lg::before {
  margin-top: -.5em;
  margin-left: -.5em;
  width: 1em;
  height: 1em;
  animation: k-loading-animation .7s linear infinite;
  z-index: 12000;
}

div.k-i-loading-lg::after {
  margin-top: -.25em;
  margin-left: -.25em;
  width: .5em;
  height: .5em;
  animation: k-loading-animation reverse 1.4s linear infinite;
  z-index: 12000;
}

//this is for general dialogs
.k-dialog-wrapper {
  z-index: 99994;
}

//this is for unsaved changes dialogs
.utilPrompt.k-dialog-wrapper {
  z-index: 99995;
}

//this is for info dialogs
.utilInfo.k-dialog-wrapper {
  z-index: 99996;
}

//this is for error dialogs
.utilError.k-dialog-wrapper {
  z-index: 99997;
}

//this is for context menus and dropdown selections
kendo-popup.k-animation-container {
  z-index: 99998 !important;
}

//this is for animated notification popups
.k-notification-group {
  z-index: 99999;
}

.k-window {
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.k-window .k-window-content {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
  height: 100%;
}

.k-window.k-dialog {
  height: initial;
}

.k-window-titlebar {
  border: none;
}

.k-window .k-window-titlebar {
  height: 34px;
}

.k-window .k-window-titlebar,
.k-window .k-window-titlebar span,
.k-window .k-window-titlebar div {
  margin: 0;
  padding: 0;
  font-size: 16.8px;
}

.k-window .k-window-titlebar button {
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.k-window .k-window-titlebar .k-window-title,
.k-window .k-window-titlebar .row-g {
  padding-left: 5px;
}

.k-window-titlebar .k-dialog-titlebar-actions .k-dialog-titlebar-action {
  padding: 14px;
}

a>.k-svg-i-x {
  font-size: 1.4em;
  color: variables.$dark-red;
  margin: 0 0 0 -5px;
}

a>.k-svg-i-x:hover {
  color: variables.$light-red;
}

a>.k-svg-i-x:active {
  color: variables.$medium-red;
}

.k-notification .k-notification-wrap {
  align-items: center;
}

.k-notification .k-notification-wrap .k-icon {
  margin: 1px 5px 0 0;
}

.k-notification .k-notification-content {
  font-size: 18px;
}

div.k-i-loading-lg {
  position: static;
  background-color: transparent;
  box-sizing: border-box;
  font-size: 64px;
  color: variables.$highlight-color;
}

div.k-i-loading-lg::before,
div.k-i-loading-lg::after,
div.k-loading-lg-image::before,
div.k-loading-lg-image::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-block;
  content: "";
  box-sizing: inherit;
  border-radius: 50%;
  border-width: .05em;
  border-style: solid;
  border-color: currentColor;
  border-top-color: transparent;
  border-bottom-color: transparent;
  background-color: gray;
}

div.k-i-loading-lg::before {
  margin-top: -.5em;
  margin-left: -.5em;
  width: 1em;
  height: 1em;
  animation: k-loading-animation .7s linear infinite;
  z-index: 12000;
}

div.k-i-loading-lg::after {
  margin-top: -.25em;
  margin-left: -.25em;
  width: .5em;
  height: .5em;
  animation: k-loading-animation reverse 1.4s linear infinite;
  z-index: 12000;
}

.k-switch {
  font-size: 12px;
  width: 5.0em;
  display: flex;
}

.k-switch span {
  display: flex;
  overflow: visible;
}

.k-switch span.k-switch-track {
  justify-content: flex-start;
  align-items: center;
}

.k-switch .k-switch-label-on {
  transform: translateY(0%);
  top: auto;
  position: relative;
  left: 8px;
}

.k-switch .k-switch-label-off {
  right: 0.5em;
  transform: translateY(0%);
  top: auto;
  position: relative;
  left: 14px;
}

//add missing data icon, unicode e924
.k-i-data:before {
  content: "\e924";
}

.k-drawer-container {
  flex-grow: 1;
}

.k-grid-header .k-grid-header-wrap .k-filter-row td {
  padding: 3px;
}

.k-grid-header-wrap .k-header.k-filterable .k-icon {
  margin: 0;
  position: absolute;
  top: -1px;
  right: 13px;
}

.k-grid-header-wrap .k-header.k-filterable .k-column-resizer {
  width: 10px;
}

.k-grid-header-wrap .k-header.k-filterable .k-sort-order {
  margin: 0;
  position: absolute;
  top: 0;
  right: 10px;
  font-weight: bold;
}

.k-grid-header-wrap .k-header.k-filterable .k-cell-inner,
.k-grid-header-wrap .k-header.k-table-th .k-cell-inner {
  margin: 0 -20px 0 -10px;
}

.k-grid-header-wrap .k-header.k-filterable>.k-cell-inner>.k-link,
.k-grid-header-wrap .k-header.k-table-th>.k-cell-inner>.k-link {
  padding: 7px 0 0 10.5px;
}

.k-grid-header .k-header.k-filterable>.k-cell-inner>.k-link .k-sort-icon {
  margin: 0;
}

.k-grid-header .k-header.k-filterable>.k-cell-inner>.k-link .k-sort-icon .k-icon {
  margin-left: 0;
  position: absolute;
  top: 0;
  right: 15px;
  font-weight: bold;
}

.k-grid-header .k-header.k-filterable>.k-cell-inner>.k-link .k-icon {
  margin-left: 2px;
  font-weight: bold;
}

.k-grid .k-grid-header-wrap .k-header.k-filterable kendo-grid-filter-menu {
  margin-right: 10px;
}

.k-grid .k-grid-header-wrap .k-header.k-filterable .k-grid-filter-menu {
  top: 0;
  right: 10px;
  display: inline-block;
}

.k-grid .k-grid-header-wrap .k-header.k-filterable .k-grid-filter-menu kendo-svgicon.k-svg-i-filter {
  margin-top: 12px;
  margin-right: -2px;
}

.k-panelbar>.k-item>.k-link {
  text-transform: none;
}

.k-grid-content,
.k-grid-content-locked {
  white-space: nowrap;
}

.k-grid-header .k-filtercell .k-filtercell-wrapper .k-filtercell-operator {
  display: none;
}

//makes it so that clicking on the sort number above the filter icon opens the filter rather than triggering a sort
kendo-grid-filter-menu {
  z-index: 1;
}

.k-window .k-window-actions,
.k-window .k-window-titlebar-actions {
  gap: 0;
}

.k-window .k-dialog-actions {
  gap: 0.5rem;
}

.k-window .k-window-titlebar-actions .k-button.k-icon-button {
  height: calc(1.5em + .75rem + 2px);
  width: calc(1.5em + .75rem + 15px);
}

.k-input.k-multiselect {
  height: 100%;
  overflow: visible;
}

.k-input.k-multiselect .k-input-values {
  padding: 0 0 2px 5px;
  column-gap: 3px;
  row-gap: 3px;
}

.k-input.k-multiselect .k-input-values .k-chip-list .k-chip {
  padding: 1px;
  line-height: normal;
  margin-top: 2px;
  margin-bottom: 0;
  background: none;
}

.k-input.k-multiselect .k-input-values .k-chip-list .k-chip-content {
  line-height: 16px;
  margin: 0;
  padding: 0;
}

.k-input.k-multiselect .k-chip-list .k-chip.k-chip-solid-base {
  background: none;
  border-color: #bcbebf;
}

.k-input.k-multiselect .k-input-values .k-input-inner {
  padding: 0 0 0 3px;
  margin: 0;
}

.k-grid .k-grid-header .k-grid-filter-menu.k-active,
.k-grid .k-grid-header .k-header-column-menu.k-active,
.k-grid .k-grid-header .k-hierarchy-cell .k-icon.k-active {
  background-color: transparent;
}

.k-grid .k-grid-header .k-grid-filter-menu kendo-svgicon.k-svg-i-filter,
.k-grid .k-grid-header .k-header-column-menu kendo-svgicon.k-svg-i-filter,
.k-grid .k-grid-header .k-hierarchy-cell .k-icon kendo-svgicon.k-svg-i-filter {
  padding: 3px;
}

.k-column-title {
  //prefer showing as much column text as possible rather than ellipsis
  text-overflow: clip;
}

.k-upload {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  border: unset;
}

.k-upload .k-dropzone {
  display: flex;
  flex-grow: 1;
  flex-direction: column
}

.k-upload .k-dropzone .k-upload-button-wrap {
  align-self: flex-start
}

.k-upload .k-dropzone .k-dropzone-hint {
  display: flex;
  align-items: center
}

.k-input-button.k-icon-button {
  border-left: none;
}

.k-input .k-clear-value {
  color: transparent;
  height: 25px;
  padding: 0 5px 0 0;
}

.k-input:hover .k-clear-value {
  color: inherit;
  display: flex;
}

.k-input:hover .k-clear-value:active {
  color: red;
}

.k-window-titlebar-action,
.k-dialog-titlebar-action {
  opacity: 1;
}

.k-overlay {
  opacity: 0.8;
}

.k-dialog-wrapper .k-overlay {
  opacity: 0.6;
}

.k-listview .k-listview-item span,
.k-listview .k-listview-item div {
  display: flex;
  padding: 4px;
}

.k-grid .k-grid-filter-popup .k-filter-menu .k-filter-menu-container kendo-grid-numeric-filter-menu {
  gap: 0.5rem;
  display: flex;
  flex-direction: column;
}

.k-checkbox {
  margin-bottom: 2px;
}

.k-radio {
  margin-top: 3px;
  margin-right: 3px;
}

.k-button span.k-icon {
  margin-bottom: 2px;
}

.k-datepicker.readOnlyBox .k-input-button {
  display: none;
}

.k-combobox.readOnlyBox .k-input-button,
.k-combobox-readOnlyBox .k-clear-value {
  display: none;
}

.k-editor {
  display: flex;
  border-radius: 4px;
  margin: 3px; //this is so that the box-shadow doesn't get cut off due to hidden overflow when the editor is focused
}

.k-editor .k-toolbar {
  border-radius: 4px;
}

.k-editor .k-editor-content {
  border-radius: 4px;
}

.k-editor .k-toolbar .k-dropdown-button .k-button {
  background-image: none !important;
}

.k-editor .k-toolbar .k-dropdown-button .k-button .k-button-text {
  background-color: transparent !important;
}

.k-menu-popup .k-menu-group .k-menu-item .k-menu-link .k-menu-link-text {
  margin: 10px 20px 10px 20px;
}

.k-editor.k-readonly {
  opacity: 1;
}

.k-editor.k-readonly .k-toolbar {
  display: none;
}

.k-editor .k-editor-content .ProseMirror {
  padding: 7px 14px 7px 14px;
}

.k-editor .k-editor-content .ProseMirror hr {
  margin: 15px 0 15px 0;
}

// this is a temporary fix for some calendar dates not being clickable
// https://github.com/telerik/kendo-angular/issues/3769
.k-calendar-navigation {
  z-index: 1;
}

.k-splitter {
  background-color: transparent;
}

.k-splitter-flex .k-pane {
  display: flex;
}

.smallCombo.k-combobox .k-input-button,
.smallCombo.k-dropdownlist .k-input-button {
  display: none;
}

.smallCombo.k-combobox:hover .k-input-button {
  display: flex;
  right: 0;
  z-index: 3;
}

.smallCombo.k-combobox .k-dropdown-wrap .k-input {
  text-indent: 2px;
  padding-top: 1px;
}

.smallCombo.k-combobox .k-input-inner {
  text-overflow: clip;
}

.smallCombo.k-combobox .k-clear-value,
.smallCombo.k-combobox .k-clear-value:hover {
  position: absolute;
  right: 25px;
  z-index: 2;
  height: auto;
  width: 15px;
  stroke: transparent;
}

.k-drawer-item {
  line-height: 21px;
}

.k-input-button .k-button-icon {
  min-width: auto !important;
}

.k-grid .k-pager-md {
  row-gap: 0;
  column-gap: 0;
}

.k-grid .k-grid-pager .k-button.k-selected::before {
  opacity: 0;
}

.k-grid .k-grid-pager .k-button {
  border-radius: 0;
  line-height: 21px;
  padding: 4px 8px 4px 8px;
}

.k-grid .k-pager-numbers .k-button {
  padding: 0.375rem;
  border-width: 1px;
}

.k-grid .k-pager-md .k-pager-nav.k-button {
  min-width: calc(1.5em + 0.75rem + 2px);
  min-height: calc(1.5em + 0.75rem + 2px);
}

kendo-sortable .k-input-inner {
  z-index: auto;
}

.k-grid .k-table-th.k-filterable .k-cell-inner .k-grid-filter-menu {
  display: flex;
  margin-right: 0;
}

.k-grid .k-grid-md .k-table-th,
.k-grid-md .k-table-th {
  padding-block: 0;
  padding-inline: 0;
  vertical-align: middle;
}

.k-grid .k-grid-md .k-filter-row td,
.k-grid .k-grid-md .k-filter-row .k-table-td,
.k-grid .k-grid-md .k-filter-row .k-table-th,
.k-grid-md .k-filter-row td,
.k-grid-md .k-filter-row .k-table-td,
.k-grid-md .k-filter-row .k-table-th {
  padding-block: 3px;
  padding-inline: 3px;
}

.k-switch-off .k-switch-thumb {
  background-color: #adb5bd;
}