/* Animations */

@keyframes button-pop {

  0% {
    transform: scale(var(--btn-focus-scale, 0.95));
  }

  40% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

/* Layout */
html {
  overflow: hidden;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 100%;
}

#content-container {
  position: relative;
  height: 100vh;
  overflow: auto;
}

.max-h-full {
  max-height: 100%;
}

.hidden {
  display: none !important;
}

/* Tabs */
.tab.active {
  background-color: var(--surface-elevated);
  color: var(--foreground);
  --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
}

.tab-content {
  min-height: 0;
}

.tab-content>div {
  display: none;
  height: 100%;
}

.tab-content>div.active {
  display: flex;
  flex-direction: column;
}

.tab-content .status {
  width: 100%;
  text-align: center;
  padding: 10px;
}

/* Switches */

.switch {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 16px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: color-mix(in oklab, var(--muted-foreground) 30%, transparent);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--primary);
}

input:checked+.slider:before {
  transform: translateX(11px);
}

/* Sidebar */

#sidebar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 320px;
  box-shadow: 0px 0px 5px gray;
  flex-direction: column;
  z-index: 12;
}

#sidebar,
#sidebar-shadow {
  display: none;
}

#sidebar.open,
#sidebar-shadow.visible {
  display: flex;
}

.sidebar-group button {
  cursor: pointer;
  user-select: none;
}

#sidebar .nested {
  display: block;
  margin-left: 15px
}

#sidebar .collapsed .nested {
  display: none;
}

#sidebar-resize {
  width: 10px;
  height: 100%;
  position: absolute;
  top: 0;
  right: -5px;
  cursor: ew-resize;
  user-select: none;
}

.sidebar-list {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
}

.sidebar-item:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.sidebar-item.active {
  background-color: var(--accent);
  color: var(--accent-foreground);
  font-weight: bold;
}

.sidebar-item:active {
  animation: button-pop var(--animation-btn, 0.25s) ease-out;
}

/* Tables */
.table {
  text-indent: 0;
  display: table;
  width: 100% !important;
}

.table :where(thead, tfoot) :where(th, td),
.table-responsive-column-label {
  background-color: var(--surface);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border) !important;
}

.table-responsive-column-label {
  min-width: 120px;
  line-height: 1rem;
  padding: 8px;
  margin-right: 8px;
}

.table :where(tr:not(:last-child)) {
  border-bottom-width: 1px;
  border-color: var(--color-border);
}

.table tr:nth-child(even) {
  background-color: var(--surface);
}

.table.dataTable td {
  vertical-align: text-top;
}

th[data-dt-column="0"] .dt-column-header {
  /* Hash column title only */
  padding-left: 90px;
}

.dt-layout-table {
  margin: 0px !important;
}

.dt-paging .dt-paging-button {
  border: none !important;
}

.dt-paging .dt-paging-button:hover {
  background: hsl(var(--p)) !important;
}

.dt-paging .dt-paging-button.disabled:hover {
  background: none !important;
}

.dt-paging .dt-paging-button.current {
  background: hsl(var(--s)) !important;
}

/* Mobile breakpoints */
@media (max-width:750px) {
  #content-container {
    margin-left: 0px !important;
    max-width: 100% !important;
  }
}

@media (min-width:750px) {
  #content-container {
    margin-left: 320px;
    max-width: calc(100% - 320px);
  }

  #mobile-toolbar {
    display: none;
  }

  #sidebar {
    display: flex;
  }
}
