.tabs {
  box-sizing: border-box;
  position: relative;
  font-size: 12px;
  height: 46px;
  padding: 8px 3px 4px 3px;
  background: var(--background-color);
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  display: grid;
  transition:
    width 0.5s ease,
    height 0.5s ease,
    position 0.5s ease;
}

.tabs * {
  box-sizing: inherit;
}

.tabs .bottom-buttons {
  display: none;
  opacity: 0;
  align-items: center;
  align-content: center;
  flex-direction: row;
  gap: 5px;
  transition: opacity 0.5s ease;
  align-self: center;
}

.tabs-content {
  position: relative;
  width: calc(100% - 54px);
  height: 100%;
  gap: 5px;
  transition: width 0.5s ease;
}

/* .tab-content * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
      Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  }*/

.tab {
  position: absolute;
  left: 0;
  height: 36px;
  width: 240px;
  border: 0;
  margin: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  cursor: default;
  display: flex;
  flex-direction: column;
  transition:
    position 0.5s ease,
    width 0.3s ease;
}

.tab-background {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--tab-bg-color);
  pointer-events: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding-bottom: 2px;
  border-width: 1px;
  border-style: solid;
  border-top-color: var(--main-color);
  border-left-color: var(--main-color);
  border-right-color: var(--main-color);
  border-bottom: 1px solid var(--tab--color);
}

.tab:has(.active) .tab-background {
  background-color: var(--tab-active-bg-color);
  border-bottom: 4px solid var(--tab-active-bg-color);
  z-index: 3;
  opacity: 1;
}

.tab:not(.active) .tab-background {
  background-color: var(--tab-bg-color);
  border-bottom: 4px solid var(--tab-bg-color);
  transition: opacity 0.2s ease;
  opacity: 0;
}

@media (hover: hover) {
  .tab:not(.active):hover {
    z-index: 2;
  }

  .tab:not(.active):hover .tab-background {
    opacity: 1;
  }
}

.tab-content {
  position: absolute;
  display: flex;
  top: 0;
  bottom: 0;
  left: var(--tab-content-margin);
  right: var(--tab-content-margin);
  padding: 9px 8px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  overflow: hidden;
  pointer-events: all;
  align-content: center;
  align-items: center;
}

.tab-mini .tab-content {
  padding-left: 2px;
  padding-right: 2px;
}

.tab-favicon {
  position: relative;
  flex-shrink: 0;
  flex-grow: 0;
  height: 16px;
  width: 16px;
  background-size: 16px;
  margin-left: 4px;
  background-image: var(--logo);
}

.tab-small .tab-favicon {
  margin-left: 0;
}

.tab-mini:not(.active) .tab-favicon {
  margin-left: auto;
  margin-right: auto;
}

.tab-mini.active .tab-favicon {
  display: none;
}

.tab-title {
  flex: 1;
  font-family: Poppins;
  vertical-align: top;
  overflow: hidden;
  white-space: nowrap;
  margin-left: 4px;
  color: var(--hover-text-color);
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 calc(100% - 24px),
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 calc(100% - 24px),
    transparent
  );
}

.tab-small .tab-title {
  margin-left: 0;
}

.tab-favicon + .tab-title,
.tab-small .tab-favicon + .tab-title {
  margin-left: 8px;
}

.tab-smaller .tab-favicon + .tab-title,
.tab-mini .tab-title {
  display: none;
}

.tab.active .tab-title {
  color: var(--text-color);
}

.tab-drag-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.tab-close {
  flex-grow: 0;
  flex-shrink: 0;
  position: relative;
  width: 16px;
  height: 16px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  align-content: center;
  flex-wrap: wrap;
}

.tab-close .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-color);
  /* position: static !important; */
}

.tab-close:hover .material-symbols-outlined {
  color: var(--main-color);
}

.tab-smaller .tab-close {
  margin-left: auto;
}

.tab-mini:not(.active) .tab-close {
  display: none;
}

.tab-mini.active .tab-close {
  margin-left: auto;
  margin-right: auto;
}

@-moz-keyframes tab-was-just-added {
  to {
    top: 0;
  }
}

@-webkit-keyframes tab-was-just-added {
  to {
    top: 0;
  }
}

@-o-keyframes tab-was-just-added {
  to {
    top: 0;
  }
}

@keyframes tab-was-just-added {
  to {
    top: 0;
  }
}

.tab-bottom-border {
  position: absolute;
  background-color: var(--tab-bg-color);
  display: none;
  height: 2px;
  bottom: -2px;
  width: calc(100% - 2px);
  align-self: center;
  z-index: 99999999999999999999999999;
  border-bottom: 1px solid var(--tab-bg-color);
}

.tab.active .tab-bottom-border {
  display: block;
}

.tab:hover .tab-bottom-border {
  display: block;
}

.tabs-is-sorting .tab:not(.tab-is-dragging),
.tabs:not(.tabs-is-sorting) .tab.tab-was-just-dragged {
  transition: transform 120ms ease-in-out;
}

.tab-groups {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.tab-group {
  display: flex;
  flex-direction: column;
}

.tab-group-header {
  padding: 10px;
  cursor: pointer;
  background-color: var(--tab-bg-color);
  border: 1px solid var(--border-color);
}

.tab-group-content {
  display: flex;
  flex-direction: column;
  background-color: var(--tab-bg-color);
}

.under-tabs {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  position: sticky;
  transition: all 0.5s ease;
}
.tabs-bottom-bar {
  width: calc(100% - calc(2em + 10px));
  height: 1px;
  text-align: center;
  z-index: 0;
  display: flex;
  align-items: center;
  position: fixed;
  right: 0;
  top: 44px;
  border-top: 1px solid var(--main-color);
  transition: width 0.5s ease-in-out;
}

.tabs-bottom-bar.autohide {
  width: 100%;
  transition: width 0.5s ease-in-out;
}

#create-tab {
  display: flex;
  position: absolute;
  align-self: center;
  align-items: center;
}

#create-tab .title {
  display: none;
  font-family: Poppins;
  font-size: 12px;
  margin-left: 4px;
  color: var(--text-color);
}

#create-tab .material-symbols-outlined {
  font-size: 20px;
  color: var(--text-color);
}

#create-tab:hover .material-symbols-outlined {
  color: var(--main-color);
}

#create-tab:hover .title {
  color: var(--main-color);
}



.viewport {
  display: flex;
  flex-direction: row;
  width: calc(100% - calc(2em + 11px));
  height: calc(100% - calc(2em + 12px + 46px));
  overflow: hidden;
  right: 0;
  transition:
    width 0.5s ease,
    height 0.5s ease;
}

.iframe-container {
  height: inherit;
  width: inherit;
  right: 0;
  position: fixed;
  border-top-left-radius: 15px;
}

iframe {
  width: 100%;
  height: 100%;
  border: var(--iframe-border);
  display: none;
  /* Hide all iframes by default */
}

iframe.active {
  display: block;
}
