/*******************
 *  General rules  *
 *******************/

html,
body {
  height: 100%;
  margin: 0;
  cursor: default;
  user-select: none;
}

#content {
  display: flex;
  height: 100%;
}

.toggle-sidebar {
  background: rgba(34, 44, 49, 1);
  width: 54px;
  padding: 27px 0 20px 0;
  justify-content: space-between;
  display: flex;
  flex-direction: column;
  -webkit-app-region: drag;
  overflow: hidden;
  transition: all 0.5s ease;
  z-index: 2;
}

.toggle-sidebar div {
  transition: all 0.5s ease-out;
}

.sidebar-hide {
  width: 0;
  transition: all 0.8s ease;
}

.sidebar-hide div {
  transform: translateX(-100%);
  transition: all 0.6s ease-out;
}

#view-controls-container {
  height: calc(100% - 208px);
  overflow-y: hidden;
}

#view-controls-container::-webkit-scrollbar {
  width: 4px;
}

#view-controls-container::-webkit-scrollbar-track {
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

#view-controls-container::-webkit-scrollbar-thumb {
  background-color: rgba(169, 169, 169, 1);
  outline: 1px solid rgba(169, 169, 169, 1);
}

#view-controls-container:hover {
  overflow-y: overlay;
}

@font-face {
  font-family: "Material Icons";
  font-style: normal;
  font-weight: 400;
  src: local("Material Icons"), local("MaterialIcons-Regular"),
    url(../fonts/MaterialIcons-Regular.ttf) format("truetype");
}

/*******************
  *   Left Sidebar  *
  *******************/

#tabs-container {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;

  /* Preferred icon size */
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;

  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;
}

#actions-container {
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 0;
}

.action-button {
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.action-button:hover {
  cursor: pointer;
}

.action-button i {
  color: rgba(108, 133, 146, 1);
  font-size: 28px;
}

.action-button:hover i {
  color: rgba(152, 169, 179, 1);
}

.action-button.active {
  /* background-color: rgba(255, 255, 255, 0.25); */
  background-color: rgba(239, 239, 239, 1);
  opacity: 0.9;
  padding-right: 14px;
}

.action-button.active i {
  color: rgba(28, 38, 43, 1);
}

.action-button.disable {
  opacity: 0.6;
}

.action-button.disable:hover {
  cursor: not-allowed;
}

.action-button.disable:hover i {
  color: rgba(108, 133, 146, 1);
}

.tab {
  position: relative;
  margin: 2px 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.tab:first-child {
  margin-top: 9px;
}

.tab .server-icons {
  width: 35px;
  vertical-align: top;
  border-radius: 4px;
}

.tab .server-tab {
  width: 100%;
  height: 35px;
  position: relative;
  margin-top: 5px;
  z-index: 11;
  line-height: 31px;
  color: rgba(238, 238, 238, 1);
  text-align: center;
  overflow: hidden;
  opacity: 0.6;
  padding: 6px 0;
}

.server-tab .alt-icon {
  font-family: Verdana, sans-serif;
  font-weight: 600;
  font-size: 22px;
  border: 2px solid rgba(34, 44, 49, 1);
  margin-left: 17%;
  width: 35px;
  border-radius: 4px;
}

.tab .server-tab:hover {
  opacity: 0.8;
}

.tab.active .server-tab {
  opacity: 1;
  background-color: rgba(100, 132, 120, 1);
}

.tab.functional-tab {
  height: 46px;
  padding: 0;
}

.tab.functional-tab.active .server-tab {
  padding: 2px 0;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.25);
}

.tab.functional-tab .server-tab i {
  font-size: 28px;
  line-height: 36px;
}

.tab .server-tab-badge.active {
  border-radius: 9px;
  min-width: 11px;
  padding: 0 3px;
  height: 17px;
  background-color: rgba(244, 67, 54, 1);
  font-size: 10px;
  font-family: sans-serif;
  position: absolute;
  z-index: 15;
  top: 6px;
  float: right;
  color: rgba(255, 255, 255, 1);
  text-align: center;
  line-height: 17px;
  display: block;
  right: 0;
}

.tab .server-tab-badge {
  display: none;
}

.tab .server-tab-badge.close-button {
  width: 16px;
  padding: 0;
}

.tab .server-tab-badge.close-button i {
  font-size: 13px;
  line-height: 17px;
}

#add-tab {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.tab .server-tab-shortcut {
  color: rgba(100, 132, 120, 1);
  font-size: 12px;
  text-align: center;
  font-family: sans-serif;
  margin-bottom: 5px;
}

.refresh {
  animation: rotate-loader 1s linear infinite;
}

@keyframes rotate-loader {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(-360deg);
  }
}

/*******************
  *   Webview Area  *
  *******************/

#webviews-container {
  display: flex;
  height: 100%;
  width: 100%;
}

/* Pseudo element for loading indicator */
#webviews-container::before {
  content: "";
  position: absolute;
  z-index: 1;
  background: rgba(255, 255, 255, 1) url(../img/ic_loading.gif) no-repeat;
  background-size: 60px 60px;
  background-position: center;
  width: 100%;
  height: 100%;
}

/* When the active webview is loaded */
#webviews-container.loaded::before {
  opacity: 0;
  z-index: -1;
  visibility: hidden;
}

webview {
  /* transition: opacity 0.3s ease-in; */
  position: absolute;
  width: 100%;
  height: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

webview.onload {
  transition: opacity 1s cubic-bezier(0.95, 0.05, 0.795, 0.035);
}

webview.active {
  opacity: 1;
  z-index: 1;
  visibility: visible;
}

webview.disabled {
  opacity: 0;
}

webview.focus {
  outline: 0 solid transparent;
}

/* Tooltip styling */

#loading-tooltip,
#dnd-tooltip,
#back-tooltip,
#reload-tooltip,
#setting-tooltip {
  font-family: sans-serif;
  background: rgba(34, 44, 49, 1);
  margin-left: 48px;
  padding: 6px 8px;
  position: absolute;
  margin-top: 0;
  z-index: 1000;
  color: rgba(255, 255, 255, 1);
  border-radius: 4px;
  text-align: center;
  width: 55px;
  font-size: 14px;
}

#loading-tooltip::after,
#dnd-tooltip::after,
#back-tooltip::after,
#reload-tooltip::after,
#setting-tooltip::after {
  content: " ";
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid rgba(34, 44, 49, 1);
  position: absolute;
  top: 7px;
  right: 68px;
}

#add-server-tooltip,
.server-tooltip {
  font-family: "arial", sans-serif;
  background: rgba(34, 44, 49, 1);
  left: 56px;
  padding: 10px 20px;
  position: fixed;
  margin-top: 11px;
  z-index: 5000 !important;
  color: rgba(255, 255, 255, 1);
  border-radius: 4px;
  text-align: center;
  width: max-content;
  font-size: 14px;
}

#add-server-tooltip::after,
.server-tooltip::after {
  content: " ";
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid rgba(34, 44, 49, 1);
  position: absolute;
  top: 10px;
  left: -5px;
}

#collapse-button {
  bottom: 30px;
  left: 20px;
  position: absolute;
  width: 24px;
  height: 24px;
  background: rgba(34, 44, 49, 1);
  border-radius: 20px;
  cursor: pointer;
  box-shadow: rgba(153, 153, 153, 1) 1px 1px;
}

#collapse-button i {
  color: rgba(239, 239, 239, 1);
}

#main-container {
  display: flex;
  height: 100%;
  width: 100%;
  position: relative;
  flex-grow: 1;
  flex-basis: 0;
}

.hidden {
  display: none !important;
}

/* Full screen Popup container  */

.popup .popuptext {
  visibility: hidden;
  background-color: rgba(85, 85, 85, 1);
  color: rgba(255, 255, 255, 1);
  text-align: center;
  border-radius: 6px;
  padding: 9px 0;
  position: absolute;
  z-index: 1000;
  font-family: arial, sans-serif;
  width: 240px;
  top: 15px;
  height: 20px;
  left: 43%;
}

.popup .show {
  visibility: visible;
  animation: cssAnimation 0s ease-in 5s forwards;
  animation-fill-mode: forwards;
}

@keyframes cssAnimation {
  from {
    opacity: 0;
  }

  to {
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 1;
  }
}

send-feedback {
  width: 60%;
  height: 85%;
}

#feedback-modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(68, 67, 67, 0.81);
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 1s ease-out;
}

#feedback-modal.show {
  display: flex;
}
