/* Imports */
/*Iosevka*/
@import url('https://portainer.lepidoptero.id/override-files/fonts/Iosevka/IosevkaSS15.css');
/* Plex Mono + Sans */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');

/* Variables */
:root {
  /* Fonts */
  --font-family-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-family-monospace: "IBM Plex Mono", monospace;
  --font-family-table: "Iosevka SS15 Web", monospace; 
  
  /* Color Overrides */
  --bg-body-color: #09090b;
  --bg-panel-body-color: #141415;
  --bg-motd-body-color: #141415;
  --bg-widget-color: #141415;
  --bg-widget-table-color: #19191a;
  --bg-dashboard-widget-color: #141415;
  --bg-blocklist-hover-color: none;
  --bg-blocklist-item-hover-color: none;
  --bg-inputbox: #09090b;
  --bg-button: #1d1d20;
  --bg-checkbox: #09090b;
  --bg-table-selected-color: #19191a;
  --bg-hover-table-color: #19191a;
  
  --border-widget: #27272a;
  --border-form-control-color: #27272a;
  --border-blocklist: #27272a;
  --border-blocklist-hover: #fafafa;
  --border-table-top-color: #27272a;
  --border-checkbox: #27272a;
  
  --icon-active-color: #fafafa;
  --icon-inactive-color: #656571;
  --sort-icon: #a1a1aa;
  --sort-icon-hover: #434347;
  --sort-icon-muted: #27272a;
  
  --text-muted-color: #a1a1aa;
  --text-extra-muted-color: #434347;
  --text-body-color: #fafafa;
  --text-hyperlink-color: #fafafa;
  --text-hyperlink-hover-color: #fafafa;
  --text-pagination-span-color: #a1a1aa;
  
  --ui-success-6: hsl(102, 100%, 43%);
  --ui-error-9: hsl(349, 90%, 59%);
  --ui-warning: hsl(46, 93%, 57%);
}

/* General */
html, body {
  font-family: var(--font-family-sans);
  overflow: hidden;
}
svg, svg path {
  stroke-width: 1;
}
a, a.hyperlink {
  color: var(--text-hyperlink-color);
  &:hover {
    color: var(--text-hyperlink-hover-color);
  }
}
a.hyperlink {
  &:hover {
    text-decoration: underline;
  }
}
p {
  margin: 0 0 8px;
}
.form-section-title:is([theme="dark"] *) {
  color: var(--text-body-color);
}
.icon-orange:is([theme="dark"] *), .icon-warning:is([theme="dark"] *) {
  color: var(--ui-warning);
}

html, body {
  width: 100%;
  height: 100%;
	height: -webkit-fill-available;
  overflow: hidden;
  overscroll-behavior: none;
}
#page-wrapper, #content-wrapper {
  position: absolute;
  overflow: hidden;
  width: auto;
  height: 100lvh;
	height: -webkit-fill-available;
  top: 0; bottom: 0; left: 0; right: 0;
  margin: 0;
  padding: 0;
  transition: none;
}
.page-content {
  position: absolute;
  overflow-x: hidden;
  overflow-y: auto;
  width: auto;
  height: 100lvh;
	height: -webkit-fill-available;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  -webkit-overflow-scrolling: touch !important;
  -ms-overflow-style: 
    -ms-autohiding-scrollbar !important;
  scrollbar-width: none;
  &::-webkit-scrollbar {
    -webkit-appearance: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background-color: transparent !important;
  }
}
.page-content::before {
  content: "";
  display: block;
  position: fixed;
  z-index: 10;
  width: 100%;
  height: 1px;
  padding-bottom: env(safe-area-inset-top, 0);
  margin-top: -1px;
  backdrop-filter: blur(7px);
  background-color: rbga(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(7px);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%,rgba(0,0,0,1) 35%,rgba(0,0,0,0.9) 65%,rgba(0,0,0,0) 100%);
}

/* Hide Tooltips */
div[data-tippy-root] {
  display:none;
}

/* Hide Loading Bar */
#loading-bar {
  display: none;
}
#nprogress {
  .bar {
    display:none;
  }
  .spinner {
    top: calc(15px + env(safe-area-inset-top, 0));
    .spinner-icon { 
      border-color: #FFF transparent transparent #FFF;
    }
  }
}

/* Login Page */
.simple-box {
  position: absolute;
  overflow: hidden;
  height: 100dvh;
  top: 0;
  bottom: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  > div {
    padding-bottom: 8em!important;
  }
}
.panel {
  border: 0;
  .pb-2 {
    color: var(--text-muted-color);
  }
  input {
    color: var(--text-body-color);
    &::placeholder {
      color: var(--text-extra-muted-color);
    }
    &:focus {
      box-shadow: none;
      border-color: var(--border-blocklist-hover);
    }
  }
  
  .btn.btn-primary:is([theme="dark"] *) {
    border: 0;
    color: var(--text-muted-color);
    font-weight: 300;
    text-transform: uppercase;
  }
}

/* Main Navigation */
#sideview {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}
#sideview > sidebar {
  .flex-1 {
    flex: auto!important;
    -webkit-box-flex: initial!important;
    background: none;
  }
  > div {
    position: static;
    overflow: hidden;
    width: 100%;
    height: auto;
    bottom: 0;
    border-top: 0.5px solid var(--border-widget);
    background: var(--bg-body-color);
    > nav {
      height: 50px;
      margin-bottom: env(safe-area-inset-bottom, 0);
    }
  } 
  nav {
    margin: 0;
    display:flex;
    flex-direction: row;
    padding: 0;
    flex: auto;
    -webkit-box-flex: initial;
    > div:first-child {
      display: none;
    }
    > div:has(ul) {
      padding: 0 8px;
      margin: 0;
      display:flex;
      align-items: center;
      /* Hide Scrollbar */
      -webkit-overflow-scrolling: touch !important;
      -ms-overflow-style: 
        -ms-autohiding-scrollbar !important;
      scrollbar-width: none;
      &::-webkit-scrollbar {
        -webkit-appearance: none !important;
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background-color: transparent !important;
      }
    }
    ul, ul > div {
      display: flex;
      flex-direction: row;
      flex-grow: 1;
      align-items: center;
      justify-content: flex-end;
      margin: 0;
      padding: 0;
      li {
        margin: 3px 4px;
      }
      li, a {
        background: none;
        color: var(--icon-inactive-color);
        flex-shrink: 1;
        width: 32px;
        height: 32px;
        &.bg-blue-8 {
          color: var(--icon-active-color);
        }
        > svg {
          width: 16px;
          height: 16px;
        }
      }
    }
    .app-react-sidebar-EnvironmentSidebar-module__root {
      background: rgba(9, 9, 11, 0.3);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 0.5px solid var(--border-widget);
      box-shadow: 0px 0px 10px -5px rgba(225, 216, 249, .3);
      flex-grow: 0;
      justify-content: center;
      position: absolute;
      bottom: calc(58px + env(safe-area-inset-bottom));
      left: 8px;
      right: 8px;
      > div {
        display: flex;
        > li {
          display: none;
          margin: 3px 3px 3px 12px;
          > div {
            margin: 0;
            width: 32px;
            height: 32px;
            align-items: center;
            > svg {
              width: 24px;
              height: 24px;
              filter: grayscale(1) brightness(2);
              opacity: 0.2;
            }
          }
        }
      }
    }
  }
}
@media (orientation: landscape) {
  #sideview > sidebar  nav .app-react-sidebar-EnvironmentSidebar-module__root {
    position: static;
  } 
}

/* Page Header */
.app-react-components-PageHeader-HeaderContainer-module__header {
  padding-top: env(safe-area-inset-top, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}
.app-react-components-PageHeader-HeaderContainer-module__meta {
  .pt-3 {
    padding-top: 0.2rem;
  }
  .text-xs {
    font-family: var(--font-family-monospace);
    font-weight: 400;
    color: var(--text-muted-color);
    text-transform: uppercase;
    font-size: 0.6rem;
    display: none;
  }
  .text-2xl {
    font-size: 1.2rem;
  }
  .flex.items-center {
    align-items: center;
    > div {
      font-weight: 600;
      padding-left: 1rem;
    }
    button {
      width: 30px;
      height: 30px;
      border: 0.5px solid var(--border-widget);
      border-radius: 999px;
      svg {
        width: 14px;
        height: 14px;
      }
    }
  }
  .flex.items-end {
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 0;
    padding-right: 1rem;
  }
  .app-react-components-PageHeader-HeaderTitle-module__menu-button {
    margin-right: 0;
    margin-left: 8px;
    align-self: baseline;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0.5px solid var(--border-widget);
    border-radius: 999px;
    > div {
      color: var(--text-body-color);
      width:auto;
      height: auto;
      min-width: auto;
      margin: 0;
      padding: 0 !important;
      background: none;
      > svg {
        width: 14px;
        height: 14px;
      }
    }
    span, > svg {
      display:none;
    }
  }
}

/* Page Container */
#view {
  padding-bottom: 
    calc(96px + env(safe-area-inset-bottom, 0));
  height: auto;
    .grid {
    grid-template-columns: auto;
    border-left-color: var(--border-blocklist);
    > div {
      border-bottom-color: var(--border-blocklist);
      a:hover {
        background-color: var(--bg-blocklist-item-hover-color);
      }
    }
  }
}
.row > div, .mx-4 {
  padding-left: max(1rem, env(safe-area-inset-left, 1rem))!important;
  padding-right: max(1rem, env(safe-area-inset-right, 1rem))!important;
}
.mx-4 {
  margin: 0;
}

/* Dash Summaries */
dashboard-item {
  > div {
    border: 0 !important;
    background: var(--bg-dashboard-widget-color) !important;
  }
  .icon-badge {
    background: none!important;
    color: var(--text-body-color)!important;
    border: 1px solid var(--border-widget);
  }
  div[aria-label] {
    flex-wrap: wrap;
    div.flex-col {
      display:flex;
      flex-direction: row;
      align-items: baseline;
      div:first-child {
        margin-right: 0.25em;
      }
      > div {
        display: inline;
        font-size: 1.2rem;
        font-weight: 100;
        color: var(--text-body-color);
        text-transform: uppercase;
      }
    }
    div.ml-auto {
      flex-basis: 100%;
      flex-shrink: 0;
      > div {
        font-family: var(--font-family-monospace);
        color: var(--text-muted-color);
        font-size: 0.7rem;
        float: none!important;
        margin-left:58px;
        margin-top: .5rem;
        svg {
          width: 14px;
          height: 14px;
        }
      }
    }
  }
}

/* Widgets */
div.widget {
  border: 0 solid var(--border-widget);
  overflow: hidden;
  .widget-content {
    /* Remove Scrollbars*/
    div {
      -webkit-overflow-scrolling: touch !important;
      -ms-overflow-style: 
        -ms-autohiding-scrollbar !important;
      scrollbar-width: none;
      &::-webkit-scrollbar {
        -webkit-appearance: none !important;
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background-color: transparent !important;
      }
    }
    /* Remove Widget Card Padding */
    .px-4 {
      padding: 0;
    }
  }
}

/* MOTD Widget */
.widget-body.motd-body {
  padding: 0;
  background: none;
  > .widget-content {
    padding: 1rem;
    > div {
      margin: 0!important;
      width: 100%!important;
      > .form-section-title {
        margin-top: 0;
        font-weight: 600;
        font-size: 0.9rem;
        > .small {
          button {
            color: var(--text-body-color);
            border: 0.5px solid var(--border-widget);
            border-radius: 999px;
            font-size: 0;
            padding: 0;
            margin: 0;
            display: inline-block;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
          }
        }
      }
      .text-muted {
        font-family: var(--font-family-monospace);
        font-weight: 300;
        font-size: 0.65rem;
        line-height: 1.5em;
        text-align: left;
        > p {
          max-width: 200ch;
        }
      }
    }
  }
}

/* Toolbars */
.datatable .toolBar .toolBarTitle {
  font-size: 0.9rem;
  height: 32px;
  display: none;
}
.datatable .toolBar {
  background: none;
  overflow-y: hidden;
  overflow-x: auto;
  flex-wrap: nowrap;
  gap: 0 !important;
  row-gap: 0 !important;
  column-gap: 8px !important;
  padding: 0 1rem;
  margin-top: 1rem;
  border-radius: 0;
  mask-image: linear-gradient(
      to right,
      rgba(0,0,0,0) 0.2rem,
      rgba(0,0,0,1) 1rem,
      rgba(0,0,0,1) calc(100% - 1rem),
      rgba(0,0,0,0) calc(100% - 0.2rem)
    );
  /*Hide Useless Filler Text*/
  &:has(.w-full.text-sm.text-gray-7) {
    display: none;
  }
  &:has(.flex) {
    mask-image: none;
    padding: 0;
    overflow-x: hidden;
    column-gap: 0 !important;
  }
  > .flex {
    padding: 0 1rem;
    overflow-x: auto;
    gap: 0 !important;
    column-gap: 8px !important;
    mask-image: linear-gradient(
      to right,
      rgba(0,0,0,0) 0.2rem,
      rgba(0,0,0,1) 1rem,
      rgba(0,0,0,1) calc(100% - 1rem),
      rgba(0,0,0,0) calc(100% - 0.2rem)
    );
    > .flex:not(.searchBar) {
      display: contents;
    }
  }
  a, button, span.setting {
    position: relative;
    touch-action: pan-x;
    flex-shrink: 0;
    display: flex;
    font-size: 0px;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 0 !important;
    outline: 0!important;
    outline-offset: 0!important;
    border: 0;
    border-radius: 4px;
    
    > * {
      position: absolute;
    }
    svg {
      display: block;
      flex-shrink: 0;
      width: 14px;
      height: 14px;
      margin: 0;
      padding: 0;
    }
    .dropdown-toggle {
      display: block;
    }
  }
}
.widget .widget-icon:is([theme="dark"] *) {
  border-radius: 0;
  background: none;
  margin: 0;
  padding: 0!important;
  width: 24px;
  height: 24px;
  > svg {
    width: 14px;
    height: 14px;
  }
}
.searchBar,
.toolBar .searchBar {
  border: 1px solid var(--border-widget);
  height: 28px;
  margin: 0;
  min-width: 10rem !important;
  max-width: none;
  flex-grow: 1;
  padding: 0;
  .searchIcon {
    color: var(--text-extra-muted-color);
    margin: 0 6px;
  }
  .searchInput {
    width: 100%;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    color: var(--text-muted-color);
    &::placeholder {
      color: var(--text-muted-color);
    }
  }
  button {
    color: var(--text-muted-color);
  }
}
.toolBar .actionBar {
  gap: 0 !important;
  column-gap: 8px !important;
}
.datatable .toolBar .settings {
  margin: 0;
  button, span {
    color: var(--text-muted-color);
  }
}

/* Filter Toolbar */
.widget .-mt-3 {
  margin: 0;
  height: auto;
  > .flex.gap-2 {
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 8px;
    padding: 0 1rem;
    mask-image: linear-gradient(
      to right,
      rgba(0,0,0,0) 0.2rem,
      rgba(0,0,0,1) 1rem,
      rgba(0,0,0,1) calc(100% - 1rem),
      rgba(0,0,0,0) calc(100% - 0.2rem)
    );
    .app-react-portainer-HomeView-EnvironmentList-EnvironmentList-module__filter-right > div {
      height: 100%;
    }
    .app-react-portainer-HomeView-EnvironmentList-EnvironmentList-module__filter-left,
    .app-react-portainer-HomeView-EnvironmentList-EnvironmentList-module__filter-right {
      flex-shrink: 0;
      flex-basis: fit-content;
      height: 24px;
      min-width: 6rem;
      margin: 0;
    }
  }
}
.actionBar:has(.row) {
  margin-top: 8px;
  padding: 0 1rem;
}
.actionBar > .row {
  display: flex;
  margin: 0;
  column-gap: 8px;
  &::before {
    content: none;
  }
  > div {
    margin: 0;
    padding: 0;
    display: contents;
    template-list-dropdown {
      display: block;
      flex-basis: fit-content;
      min-width: 4rem;
      height: 24px;
    }
    template-list-sort > div {
      display: flex;
      column-gap: 8px;
      .app-react-docker-app-templates-TemplateListSort-TemplateListSort-module__sort-by-element {
        height: 24px;
      }
    }
  }
}
.widget .-mt-3 button,
.actionBar > .row button {
  flex-shrink: 0;
  flex-basis: fit-content;
  height: 24px;
  min-width: 2.75rem;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background-color: var(--bg-button);
  color: var(--text-muted-color) !important;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 300;
  cursor: pointer;
  > div {
    height: 100%;
    align-items: center;
    justify-content: center;
    > svg {
      height: 10px;
      path {
        fill: currentColor;  
      }
    }
  }
}

/* Blocks */
.blocklist {
  margin: 12px 1rem 0 1rem;
  padding: 0 !important;
  a, a:hover {
    text-decoration: none;
  }
  /* General Blocks */
  .blocklist-item {
    padding-right: calc(2.75rem + 10px)!important;
    padding-bottom: calc(2.755rem + 10px);
    display:block;
    transition: all 0.15s ease-out;
    &:not(.blocklist-item-not-interactive):hover {
      border-color: var(--border-blocklist-hover);
    }
    .self-center > img {
      filter: grayscale(1) brightness(0.5);
      display: none;
    }
    > div:last-child {
      margin: 0;
      > div {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        row-gap: 2px;
        padding-right: 0;
        overflow: hidden;
        width: 100%;
        > span {
          &.font-bold {
            font-size: 1.4em;
            text-transform: uppercase;
            font-weight: 200;
          }
          &.flex.items-center {
            border-radius: 2em;
            border: 1px solid;
            padding: 0 8px;
            background-color: transparent;
            color: var(--ui-success-6);
            font-size: 0.75em;
            font-weight: 400;
            svg {
              color: inherit !important;
              stroke-width: 2;
            }
          }
          &.font-bold, &.flex.items-center {
            margin-bottom: 0.6em;
            height:22px;
          }
          &:not(.font-bold, .flex.items-center) {
            font-family: var(--font-family-monospace);
            color: var(--text-extra-muted-color);
            font-weight: 300;
            font-size: 0.7rem;
            flex-basis: 100%;
            text-align: left;
            padding-left: 19px;
            &:has(svg) {
              padding-left: 0;
            }
            &.blocklist-item-actions {
              padding: 0;
              button {
                margin: 4px 0;
                border-radius: 4px;
              }
            }
            svg.icon-xs {
              --icon-size: 14px;
            }
          }
        }
      }
      .blocklist-item-desc {
        font-family: var(--font-family-monospace);
        font-weight: 300;
        font-size: 0.7rem;
        white-space: nowrap;
        column-gap: 0;
        row-gap: 4px;
        padding: 0;
        max-width: 19rem;
        color: var(--text-extra-muted-color);
        span > span:not(.flex) {
          overflow: hidden;
          word-spacing: 3rem;
          width:1.6rem;
          padding-left: 2px;
        }
        > span > span.flex {
          margin-left: -4px;
          text-align: left;
          gap: 0;
          > span {
            &:has(.icon-success) {
              color: var(--ui-success-6);
            }
            &:has(.icon-danger) {
              color: var(--ui-error-9);
            }
            &:has(.icon-warning) {
              color: var(--ui-warning);
              > .icon-warning {
                color: var(--ui-warning);
              }
            }
          }
        }
        > span:has(span.flex) {
          order:-1;
        }
      }
    }
  }
  /* Front Page Dashboard Blocks */
  .relative > .absolute {
    left: 0;
    width: auto;
    pointer-events: none;
    border: 1px solid transparent;
    border-right: 0;
    > div.flex {
      align-items: flex-end;
      margin: 0;
      padding-bottom: 0;
      > div {
        pointer-events: auto;
        flex-direction: row;
        gap: 0;
        height: 2.75rem;
        border-top: 1px solid var(--border-blocklist);
        > a, button {
          color: var(--text-muted-color);
          font-weight: 300;
          text-transform: uppercase;
          height: 100%;
          padding: 0;
          border: none;
          border-radius: 0 0 0 8px;
          border-right: 1px solid var(--border-blocklist);
          background: none;
          opacity: 1;
          transition: all .1s;
          &:hover {
            --tw-bg-opacity: 1;
            background-color: var(--bg-blocklist-item-hover-color);
            color: var(--text-body-color);
          }
          &:focus {
            box-shadow: none;
            color: var(--text-body-color);
          }
        }
        > div {
          height: 100%;
          border-radius: 0;
          width: 2.75rem;
          flex-shrink: 0;
          overflow: hidden;
          font-size: 0;
          gap: 0;
          background: none;
          > div {
            background: var(--ui-success-6);
          }
          > svg {
            width: 16px;
            height: 16px;
            color: var(--text-extra-muted-color);
            opacity: 0.4;
          }
        }
      }
    }
    > div.grid {
      margin: 0;
      pointer-events: auto;
      > div {
        color: var(--text-extra-muted-color);
        > a {
          transition: all .1s;
        }
      }
    }
  }
  /* Template Page Blocks*/
  template-item {
    template-item-actions {
      padding-top: 6px;
      overflow: hidden;
      display: block;
      button {
        border: 0;
        font-family: var(--font-family-sans);
        font-weight: 200;
        text-transform: uppercase;
        color: var(--text-muted-color)!important;
        border-radius: 999px!important;
        padding: 2px 8px;
        width: 100%
      }
    }
    .blocklist-item {
      padding: 10px!important;
      &.blocklist-item--selected {
        background: none;
        border: 1px solid var(--border-blocklist-hover);
      }
      .blocklist-item-actions {
        order: 1;
      }
      .blocklist-item-box > div.vertical-center {
        align-items: center;
        justify-content: center;
        max-width: 60px;
        img, div {
          max-height: 30px;
          max-width: 30px;
        }
        svg {
          display: block;
          width: 18px;
          height: 18px;
        }
      }
      .template-item-details {
        padding-left: 10px;
      }
      .blocklist-item-line {
        width: 100%;
        height: auto;
        overflow: hidden;
        &.template-item-details-sub {
          flex-wrap: wrap;
          justify-content: right;
        }
        > span {
          font-size: .9rem;
        }
        > span.blocklist-item-title {
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          flex-shrink: 1;
        }
        > div.blocklist-item-subtitle {
          margin: 0;
          padding: 0;
          align-self: flex-start;
          height: 1.5rem;
          flex-shrink: 0;
          color: var(--text-extra-muted-color);
          svg path {
            fill: currentColor;
          }
        }
        > span.blocklist-item-desc {
          white-space: normal;
          flex-basis: 100%;
          flex-shrink: 0;
          font-size: 0.7rem;
          max-width: none;
          color: var(--text-muted-color);
        }
        > span.small.text-muted {
          color: var(--text-extra-muted-color);
          font-size: 0.7rem;
          padding: 0 8px;
          height: 20px;
          border: 1px solid var(--border-widget);
          border-radius: 999px;
          margin-top: 8px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          align-self: end;
        }
      }
    }
  }
}

/* Dropdowns */
.portainer-selector-root.md {
  height: 100%;
  min-height: auto;
  padding: 0;
  .portainer-selector__control {
    height: 100%;
    min-height: auto;
    border: 0;
    border-radius: 999px;
    &.portainer-selector__control--is-focused,
    &.portainer-selector__control--is-focused:hover {
      box-shadow: none;
      .portainer-selector__placeholder,
      .portainer-selector__indicator {
        color: var(--text-muted-color);
      }
    }
    .portainer-selector__value-container {
      height: 100%;
      padding: 0 10px;
      .portainer-selector__placeholder {
        font-family: var(--font-family-sans);
        color: var(--text-extra-muted-color);
        height: auto;
        line-height: normal;
        font-size: 0.7rem;
        margin: 0;
      }
      .portainer-selector__input-container {
        padding: 0;
        margin: 0;
        height: 100%;
      }
    }
    .portainer-selector__indicators {
      .portainer-selector__indicator {
        color: var(--text-extra-muted-color);
        transition: none;
        padding: 0 6px 0 0;
        height: 100%;
        align-items: center;
        justify-content: center;
        svg {
          width: 12px;
          height: 12px;
        }
      }
    }
  }
}

/* Buttons */
.widget .widget-body table tbody td .btn {
  font-family: var(--font-family-sans);
  font-weight: 400;
  padding: 5px 10px;
}
.widget .widget-body table tbody td .btn,
.btn.btn-default:is([theme="dark"] *), 
.btn.btn-light:is([theme="dark"] *) {
  background-color: var(--bg-button);
  color: var(--text-muted-color);
  &:hover {
    background-color: var(--bg-button);
    color: var(--text-muted-color);
  }
}
.btn.btn-dangerlight:is([theme="dark"] *) {
  background-color: var(--bg-button);
  color: var(--ui-error-9);
  &:hover {
    background-color: var(--bg-button);
  }
}
.btn.btn-primary:is([theme="dark"] *) {
  background-color: var(--bg-button);
  color: var(--text-body-color);
  &:hover {
    background-color: var(--bg-button);
  }
}
.toolBar .btn.btn-primary:is([theme="dark"] *) {
  background-color: var(--bg-button);
  color: var(--ui-success-6);
  &:hover {
    background-color: var(--bg-button);
  }
}
div:not(.actionBar) > .btn-group {
	display:grid;
	grid-template-columns: 1fr 1fr;
	grid-column-gap: 8px;
	grid-row-gap: 8px;
	overflow:hidden;
	margin-bottom: 8px;
}
div:not(.actionBar) > .btn-group > .btn {
	border: none!important;
	flex-shrink: 1;
}
td:not(.actionBar) > .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle),
td:not(.actionBar) > .btn-group > .btn:last-child:not(:first-child),
td:not(.actionBar) > .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle),
div:not(.actionBar) > .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle),
div:not(.actionBar) > .btn-group > .btn:last-child:not(:first-child),
div:not(.actionBar) > .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}
div:not(.actionBar) tr .btn-group {
	display:grid;
	width:100%;
	overflow:hidden;
	grid-template-columns: 1fr 1fr;
	grid-column-gap: 8px;
	grid-row-gap: 8px;
}
div:not(.actionBar) > .btn-group > .btn.btn-dangerlight {
  grid-column: span 2;
}
container-restart-policy button {
  height: 34px;
}

/* Checkboxes */
.md-checkbox {
  margin: 0;
  width: 18px;
  height: 18px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.md-checkbox label::before {
  width: 18px;
  height: 18px;
}
.md-checkbox input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
}
.md-checkbox input[type="checkbox"]:enabled + label::before {
  border-radius: 999px;
}
.md-checkbox input[type="checkbox"]:checked + label::before {
  background: var(--bg-checkbox)!important;
  border-color: var(--text-body-color)!important;
}
.md-checkbox input[type="checkbox"]:disabled + label::before {
  border: 1px solid var(--border-checkbox)!important;
  border-radius: 999px;
  background: none!important;
  opacity: 0.5;
}
.md-checkbox input[type="checkbox"]:checked + label::after {
  border-width: 1px;
  top: 5.5px;
}

/* Tabs */
.nav-tabs{
	border-bottom: 0px;
	display: flex;
	flex-direction: row;
	& li {
		flex-grow: 1;
	}
}

/* Tables */
.table {
  font-family: var(--font-family-table);
}
.table-bordered {
  border: none;
}
.table-bordered > tbody > tr > td, 
.table-bordered > tbody > tr > th, 
.table-bordered > tfoot > tr > td, 
.table-bordered > tfoot > tr > th, 
.table-bordered > thead > tr > td, 
.table-bordered > thead > tr > th {
  border: none;
  border-top: 1px solid var(--border-table-top-color);
}
.table-bordered > tbody > tr:first-of-type > td, 
.table-bordered > tfoot > tr:first-of-type > td, 
.table-bordered > tfoot > tr:first-of-type > th, 
.table-bordered > tbody > tr:first-of-type > th, 
.table-bordered > thead > tr:first-of-type > td, 
.table-bordered > thead > tr:first-of-type > th {
  border-top: none;
}
.table-responsive {
  border: none;
  margin: 8px 0 0 0;
  > table {
    thead {
      color: var(--text-muted-color);
      border-top: 0;
      th {
        border: 0;
        .md-checkbox {
          margin-right: 0.5rem;
        }
        > div {
          gap: 0.25rem;
        }
      }
    }
    tbody {
      td {
        &:first-child {
          padding-right: 0;
          &:has(a) {
            padding-right: 8px;
          }
        }
        .md-checkbox {
          margin-right: calc(0.5rem - 2px);
        }
        svg {
          stroke-width: 2;
        }
      }
      tr:first-child > td {
        border: 0;
      }
    }
  }
}
.widget .widget-body table thead {
  border: 0;
}
.widget .widget-body table thead *,
.widget .widget-body table tbody * {
  font-size: 0.7rem;
  font-stretch: normal;
  font-weight: 200;
}
.widget .widget-body table thead th {
  button {
    display: block;
  }
  .table-filter {
    svg {
      position: absolute;
      padding: 2px 0 0 0 !important;
    }
  }
  span.table-filter,
  div:has(> svg) {
    position: relative;
    display:flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-table-top-color);
    border-radius: 999px;
    width: 18px;
    height: 18px;
    margin: 0!important;
    font-size: 0!important;
    pr-icon {
      display: contents;
    }
    svg {
      stroke-width: 2;
      color: var(--sort-icon-muted);
      height: 13px;
      width: 13px;
      padding: 2px 0;
    }
  }
}
th {
  button > div {
    column-gap: 4px;
  }
}
.widget rd-widget-body .widget-body.no-padding {
  padding: 0 1rem;
}
.datatable .widget rd-widget-body .widget-body.no-padding {
  padding: 0;
}
div:not(.datatable) > rd-widget .widget .widget-body table tbody td {
  font-family: var(--font-family-monospace);
  word-break: normal;
  > span {
    display: inline-block;
    width: 100%;
    vertical-align: middle;
    line-height: 1rem;
    margin: 0;
    > pr-icon {
      vertical-align: middle;
      > svg {
        stroke-width: 1;
      }
    }
  }
}
.widget .widget-body table tbody td {
	word-break: break-all!important;
}
.table > tbody > tr > td:has(container-restart-policy) {
  padding: 8px 0 1px 0;
}
.table > tbody > tr > td:has(.btn-group) {
  padding: 1rem 0 0 0;
}

/* Container Details Table */
.widget:has(.container-details-table) {
  overflow: clip;
}
table.container-details-table {
  display: block;
  width: 100%;
  > tbody {
    display: block;
    > tr {
      display: contents;
      > td {
        border: 0;
        display: block;
        width: 100%;
        word-break: break-all!important;
        > table tbody {
          tr {
            height: 1rem;
            td {
              font-size: 0.7rem!important;
              word-break: break-all!important;
              &:first-child {
                min-width: 9em;
              }
            }
          }
        }
        &:first-child {
          background: var(--bg-widget-table-color);
          border-radius: 4px;
          position: sticky;
          top: calc(8px + env(safe-area-inset-top, 0));
        }
        container-restart-policy {
          table * {
            border-color: transparent; 
          }
          button {
            margin-left: 0!important;
            width: 100%;
            border: 0;
          }
        }
      }
    }
  }
}

/* Widget Footer */
.datatable .footer {
  border-radius: 0;
  background: none;
  margin: 0 1rem;
  border-top: 0;
  padding-left: calc(1rem + 18px);
  .infoBar {
    margin: 12px 0 0 0 !important;
    font-family: var(--font-family-monospace);
    font-size: 0.7rem;
    color: var(--text-extra-muted-color);
  }
  .paginationControls {
    margin-bottom: 0;
    .pagination {
      border: 0;
      button {
        background: none;
        border: 0;
        border-radius: 0;
        padding: 0;
        height: 24px;
        width:30px;
        &:active {
          border: 0!important;
        }
      }
      .disabled > button {
        color: var(--text-extra-muted-color)!important;
      }
    }
    .limitSelector {
      order: 1;
      > span {
        display: none;
      }
      > select {
        padding: 0 0 0 10px;
        height: 24px;
        font-size: 0.7rem;
        width: 2.75rem;
        color: var(--text-extra-muted-color);
        border: 0;
        border-radius: 999px;
        &:focus {
          box-shadow: none;
          color:var(--text-muted-color);
        }
      }
    }
  }
}

/* 'New Container' Menu */
#container-capabilities {
  .form-group {
    row-gap: 0;
    border: 1px solid var(--border-widget);
    border-radius: 8px;
    padding: 0;
    margin: 0;
  }
  div.w-1\/3 {
    width: 100%;
    height: 48px;
    border-top: 1px solid var(--border-widget);
    &:first-child {
      border-top: none;
    }
    por-switch-field {
      height: 100%;
      display: block;
      padding: 0 12px;
      > div {
        display: flex;
        justify-content: space-between;
        height: 100%;
        align-items: center;
        > label {
          margin: 0;
        }
      }
    }
  }
}

/* Hide Business Features */
.app-react-components-BoxSelector-BoxSelectorItem-module__business,
.form-group div:has(> .be-indicator),
div.be-indicator-container,
.sidebar li[aria-label="Authentication logs"],
rd-widget-header[title-text="Container status"] + rd-widget-body tr:has(.be-indicator),
registries-datatable td:has(.be-indicator) > * {
  display: none;
}