/*************************************************************************************************************************
@Copyright : This piece of information is originated by and the intellectual property of Esri China (Hong Kong) Limited.
@Name of Code Originator : Raymond Sy
@Creation Date : 2025-04-14
@Description : Style Sheet for HKUST SFIP Logger
@Version : 1.0.0
*************************************************************************************************************************/
/* Main style */
html,
body,
#viewDiv {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
}

/* Tool Panel Style */
#tool-panel,
.tool-options,
.tool-option {
  box-sizing: unset;
}

#tool-panel {
  position: absolute;
  top: 32px;
  left: 42px;
  background: #242424;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  padding: 20px;
  z-index: 1;
  display: none;
  width: 250px;
  color: #FFF;
}

#tool-panel .content-title {
  font-weight: bold;
  margin-bottom: 10px;
}

#tool-panel .tool-options,
#tool-panel .mode-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#tool-panel .tool-option,
#tool-panel .mode-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 50px;
  height: 50px;
  text-align: center;
  transition: background 0.3s;
}

#tool-panel .tool-option.selected,
#tool-panel .mode-option.selected {
  border-color: #007acc;
  color: white;
}

#tool-panel .radio-group {
  margin-top: 10px;
}

#tool-panel .radio-group label {
  margin-left: 5px;
  cursor: pointer;
}

.custom-radio input[type="radio"] {
  display: none;
}

.custom-radio {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
}

.custom-radio .radio-pointer {
  width: 16px;
  height: 16px;
  border: 2px solid #007acc;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
  position: relative;
  transition: background-color 0.3s, border-color 0.3s;
}

.custom-radio input[type="radio"]:checked+.radio-pointer {
  background-color: #007acc;
  border-color: #007acc;
}

.custom-radio input[type="radio"]:checked+.radio-pointer::after {
  content: "";
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Tool Windows styles */
#toolWindow {
  position: absolute;
  top: 50px;
  right: 50px;
  width: auto;
  background: #050505;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  padding: 8px;
  z-index: 1;
  overflow: auto;
}

/* Selected feature zoom button styles */
#featureCountButton {
  cursor: pointer;
  padding: 10px;
  width: 200px;
  /* background-color: #ffffff;
  color: #6e6e6e; */
  background-color: #242424;
  color: #adadad;
}

#featureCountButton:hover {
  background-color: #303030 !important;
  color: #ededed !important;
}

/* Left list arrow button */
/* .siteprintButton:hover {
  background-color: #dbdbdb !important;
  filter: none !important;
} */

.siteprintButton svg {
  display: inline-block;
  position: relative;
  transition: transform 0.5s ease-out;
  transform: translateX(0);
}

.siteprintButton:hover svg {
  transform: translateX(5px);
}

.left-list-element:hover .siteprintButton,
.left-list-selected .siteprintButton {
  filter: brightness(0);
}

.siteprintButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 25px;
  border-bottom: 1px solid #b08606;
  cursor: pointer;
  align-self: flex-end;
}

/* Scroll Bar styles */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background-color: #8b8b8b;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #7b7b7b;
}

/* Hide the print button&bar when printing */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Left list Scroll Bar styles */
.left-scroll-button {
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.left-scroll-button:disabled {
  background-color: #555;
  color: #848484;
  border: 1px solid #555;
}

.left-scroll-button:not(:disabled) {
  background-color: #848484;
  color: #007bff;
  border: 1px solid #007bff;
  cursor: pointer;
}

/* Left list element styles */
.left-list-selected,
.left-list-element:hover {
  /* background: linear-gradient(to right, #636363 5px, #333d4d 5px) !important;
  color: white !important; */
  /*background-color: #ffffff !important;
  color: #996600;*/
  opacity: 1;
  border: 1px solid #ffffff;
  border-radius: 5px;
}

.left-list-element {
  display: flex;
  align-items: center;
  padding: 10px;
  font-size: 10px;
  cursor: pointer;
  word-break: break-word;
  /* border-bottom: rgb(222, 226, 230) 1px solid; */
  background: linear-gradient(to right, transparent 15%, rgba(223, 228, 151, 0.3) 35%, #dfe497 50%, rgba(223, 228, 151, 0.3) 65%, transparent 85%);
  background-size: 100% 1px;
  background-position: bottom center;
  background-repeat: no-repeat;
}

.leftListContent {
  color: #DDD;
}

#left-list {
  background-color: #212728;
  border-right: 1px solid #555555;
  position: relative;
  height: 92vh;
  /* overflow: auto; */
  display: flex;
  flex-direction: column;
}

#leftListHeader {
  height: 7%;
  background-color: #303949;
}

/* Dashboard styles */
#dashboard {
  height: 28%;
}

#dashboard,
#left-dashboard,
#right-dashboard {
  background-color: #293132;
}

#left-dashboard {
  border-right: 1px solid #555555;
}

.NoDataAvailable {
  color: white;
}

.leftListControlButton {
  justify-content: center;
  display: flex;
  min-height: 15px;
  max-height: 15px;
  cursor: pointer;
  align-items: center;
  color: white;
}

.leftListControlButton:hover {
  background-color: #555555;
}

#leftListControlUp {
  border-bottom: 1px solid #555555;
}

#leftListControlDown {
  border-top: 1px solid #555555;
}

/* Popup chart styles */
.esri-feature-media__chart g[role="menuitem"]:nth-of-type(1) {
  fill: #1166bb;
  stroke: #1166bb;
}

.esri-feature-media__chart g[role="menuitem"]:nth-of-type(2) {
  fill: #FFAA00;
  stroke: #FFAA00;
}

/* Full Screen style */
.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999 !important;
}

.fullscreen#left-dashboard {
  border: none !important;
}

/* Top-left full screen button */
.full-screen-button {
  position: absolute;
  top: 0px;
  right: 0px;
  background-color: rgba(109, 109, 109, 0.8);
  color: white;
  border: none;
  cursor: pointer;
  z-index: 1;
  display: none;
  height: 20px;
  width: 20px;
  align-items: center;
  justify-content: center;
}

#left-dashboard-chart,
#right-dashboard-chart {
  max-width: 100%;
  max-height: 100%;
}

/* Menu child & View Control Child button styles */
.MenuChilds,
.ViewControlChilds {
  padding: 10px 20px;
  background-color: #242424;
  color: #d1d1d1;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  margin: 5px;
}

.MenuChilds:hover,
.ViewControlChilds:hover {
  color: #ededed;
  background-color: #505050;
}

.ViewControlChilds {
  width: 50%;
}

/* System Health Item Style */
.SystemHealthItem {
  width: 95%;
  display: flex;
  margin-top: 10px;
  background-color: grey;
}

.SystemHealthItem.success {
  background-color: #0a990a;
}

.SystemHealthItem.fail {
  background-color: #990a0a;
}

.SystemHealthItemIcon {
  position: relative;
  padding: 10px;
}

.SystemHealthItem.success .SystemHealthItemIcon {
  background-color: green;
}

.SystemHealthItem.fail .SystemHealthItemIcon {
  background-color: darkred;
}

.SystemHealthItemIcon {
  position: relative;
  padding: 10px;
}

#SystemHealth {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #212728;
}

.SystemHealthItemIcon .status-tick,
.SystemHealthItemIcon .status-cross {
  display: none;
}

.SystemHealthItem.success .SystemHealthItemIcon .status-tick {
  display: unset;
}

.SystemHealthItem.fail .SystemHealthItemIcon .status-cross {
  display: unset;
}

/* Colipse button styles */
#left-list-collapse-button {
  position: absolute;
  top: 50vh;
  left: 0;
  transform: translateY(-50%);
  width: 15px;
  height: 30px;
  min-width: 15px;
  min-height: 30px;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  z-index: 1;
}

#dashboard-collapse-button {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 15px;
  min-width: 30px;
  min-height: 15px;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 0;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 0;
  z-index: 1;
}

#left-list-collapse-button:hover,
#dashboard-collapse-button:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.left-list-collapsed {
  width: 0 !important;
  overflow: hidden;
  transition: width 0.3s ease;
}

.left-list-expanded {
  transition: width 0.3s ease;
}

.dashboard-collapsed {
  height: 0 !important;
  overflow: hidden;
  transition: height 0.3s ease;
}

.dashboard-expanded {
  transition: height 0.3s ease;
}

/* Left list filter button child style */
.FilterTypeButtonChild {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid grey;
  padding: 10px;
  cursor: pointer;
}

.FilterTypeButtonChild:hover {
  background-color: rgb(67 74 75);
}

/* Responsive setting */
@media screen and (max-width: 767px) and (orientation: portrait) {

  /* 768px - 1 */
  #left-dashboard {
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid #555555;
    ;
    height: 50%;
  }

  #left-list {
    border-right: none !important;
  }

  .left-list-expanded,
  .left-list-collapsed {
    position: absolute !important;
  }

  .left-list-element {
    flex-direction: row !important;
  }

  #right-dashboard {
    height: 50%;
  }

  #dashboard {
    height: 48%;
  }

  .esri-component.esri-measurement {
    max-height: 50px;
    overflow: auto;
  }

  /* .esri-ui-top-left .esri-component{
    margin-bottom: -5px !important;
  } */
  #left-list {
    width: 100%;
    z-index: 2;
  }

  #left-list-collapse-button {
    z-index: 3;
  }

  #tool-panel {
    max-height: 190px !important;
    overflow: auto;
  }

}

/* Phone with smaller width Landscape */
@media screen and (max-width: 767px) and (orientation: landscape) {

  /* 768px - 1 */
  #toolContent {
    max-height: 200px !important;
    overflow: auto;
  }

  #tool-panel {
    max-height: 190px !important;
    overflow: auto;
  }

  #left-list {
    width: 20%;
  }

  #leftListHeader {
    height: 10%
  }

  /* #siteHeadder {
    height: 9.5vh !important;
    align-content: center;
  }
  #siteContent {
    height: 90vh !important;
  } */
}

/* Phone with larger width Landscape */
@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {

  /* 1024px  -1 */
  #toolContent {
    max-height: 200px !important;
    overflow: auto;
  }

  #tool-panel {
    max-height: 190px !important;
    overflow: auto;
  }

  #left-list {
    font-size: small !important;
  }

  #leftListHeader {
    height: 10%
  }

  /* #siteHeadder {
    height: 9.5vh !important;
    align-content: center;
  }
  #siteContent {
    height: 90vh !important;
  } */
  /* .esri-ui-top-left .esri-component.esri-locate.esri-widget--button.esri-widget{
    position: absolute !important;
    top: 237px !important;
    left: 32px !important;
  }
  .esri-ui-top-left .esri-component.esri-compass.esri-widget--button.esri-widget{
    position: absolute !important;
    top: 237px !important;
    left: 64px !important;
  } */
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (max-height: 1000px) and (orientation: portrait) {
  #left-list {
    font-size: small !important;
    width: 20%;
  }

  .siteprintButton {
    display: none !important;
  }

  #HKUSTlogo {
    max-width: 50% !important;
    max-height: 50% !important;
  }

  /* .left-list-expanded,
  .left-list-collapsed {
    position: absolute !important;
  } */
  .left-list-element {
    flex-direction: row !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .left-list-element {
    flex-direction: column;
  }

  /* No Print function for mobile/tablet */
  .siteprintButton {
    display: none !important;
  }

  .esri-component.esri-navigation-toggle.esri-widget {
    display: none !important;
  }

  .esri-ui-top-left .esri-component {
    margin-bottom: -5px !important;
  }

  .esri-ui-top-right .esri-component {
    margin-bottom: 0px !important;
  }
}

@media (max-width: 1310px) and (pointer: fine) {
  .left-list-element {
    flex-direction: column;
  }
}

.esri-popup__main-container.esri-widget.esri-popup--shadow {
  max-width: 400px;
}

.esri-features__header {
  order: 1;
}

calcite-label {
  --calcite-label-text-color: #d1d1d1;
}

@keyframes flow {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

/* Real Time Weather Info Div Styles */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.fade-in {
  animation: fadeInDown 0.8s ease-in-out;
  animation-fill-mode: forwards;
  visibility: visible;
}

.fade-out {
  animation: fadeOutUp 0.8s ease-in-out;
  animation-fill-mode: forwards;
  visibility: hidden;
}

.leftListContent .fa-battery-full,
.leftListContent .fa-battery-quarter,
.leftListContent .fa-battery-half,
.leftListContent .fa-battery-three-quarters,
.leftListContent .fa-battery-empty {
  transform: rotate(270deg);
  font-size: 20px;
  margin-right: -4%;
}


.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  justify-content: center;
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out, box-shadow 0.6s ease-in-out;
  transform: translate3d(100%, 0, 0) rotateY(45deg);
  transform-origin: left;
  opacity: 0;
  backface-visibility: hidden;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}


.slide.active {
  transform: translate3d(0, 0, 0) rotateY(0deg);
  opacity: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.slide.exit-left {
  transform: translate3d(-100%, 0, 0) rotateY(-45deg);
  opacity: 0;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.slide.enter-right {
  transform: translate3d(100%, 0, 0) rotateY(45deg);
  opacity: 0;
}

.container {
  height: 120px;
  perspective: 400px;
  position: relative;
  overflow: hidden;
  display: block;
}

.hidden {
  display: none;
}

.slide.exit-right {
  transform: translate3d(100%, 0, 0) rotateY(60deg);
  opacity: 0;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.slide.enter-left {
  transform: translate3d(-100%, 0, 0) rotateY(-60deg);
  opacity: 0;
}

.tabs a.active {
  color: #fff;
}

.tabs a {
  text-decoration: none;
  color: #777;
  text-transform: uppercase;
  padding: 10px 20px;
  display: inline-block;
  position: relative;
  z-index: 1;
  transition-duration: 0.6s;
}

#buildExpDiv {
  width: 190px;
  bottom: 50px;
  position: fixed;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: scroll;
  transform-origin: bottom left;
  background-color: #24242400;
  align-items: end;
  right: 50px
}

/* RSS Info Div Styles */
:root {
  --marquee-width: 38vw;
  --marquee-speed: 30s;
}

.marquee-wrapper {
  height: 6vh;
  overflow: hidden;
  position: relative;
  margin-left: 20px;
  margin-right: 20px;
  display: flex;
  align-items: center;
}

.marquee-content {
  color: #fff;
  font-size: 18px;
}

#rssInfoText {
  display: flex;
  align-items: center;
}

@keyframes scroll {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.rssWarningIcon {
  height: 4vh;
  filter: drop-shadow(0px 0px 1px white) drop-shadow(0px 0px 1px white) drop-shadow(0px 0px 1px white);
  margin-left: 10px;
}

.weatherIcon {
  margin-right: 5px;
}