/* complex project CSS */
.detailed-view {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  vertical-align: center;

  .label {
    padding-left: 50px;
    margin-top: auto;
    margin-bottom: auto;
    font-size: 18px;
    font-weight: 400;
    height: 100%;
    color: #c1c9be;
  }

  label {
    position: relative;
    z-index: 10 !important;
  }
}

.anvil-panel-col:has(.anvil-role-comp-xy-panel) {
  overflow: visible;
}

.switch {
    width: 36px;
    height: 18px;
    display: inline-block;
    & input {
        display: none;
    }

    .slider {
        position: absolute;
        background-color: rgba(255,255,255,.3);
        width: inherit;
        height: inherit;
        border-radius: 34px;
        cursor: pointer;
        transition: background-color 1s linear;
        &:before {
            position: absolute;
            right: 0;
            content: "";
            height: 18px;
            width: 18px;
            border-radius: 50px;
            background-color: #fff;
            transition: .4s, background-color 1s linear;
        }
        transform: rotate(180deg);
        -webkit-transform: rotate(180deg);
        -ms-transform: rotate(180deg);
    }
    
    input:checked + .slider {
        background-color: #84d994;
    }

    input:checked + .slider:before {
        -webkit-transform: translateX(-21px);
        -ms-transform: translateX(-21px);
        transform: translateX(-21px);
    }
}

.transferline-comp {
  /*grid-area: transfer1;*/
  position: relative;
  background-color: #484947;
  height: 2.5px; /* width (length) and height are of course arbitrary in this stylsheet, since they are changed through the code */
  width: 120px;
  border-radius: 3px;
  overflow: hidden;
  transform-origin: center;
  will-change: transform;
  z-index: 0;
}

.transfer-indicator-comp {
  width: 14px;
  height: 2.5px;
  background: radial-gradient(circle, rgba(132, 217, 148, 1) 0%, rgba(132, 217, 148, 0.45) 50%, rgba(132, 217, 148, 0) 100%);
  position: absolute;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  z-index: 1;
  transform: scaleX(5);
  transform-origin: center;
  left: 0%;
}

.transferline-comp-label {
  color: #888888;
  font-style: normal;
  font-size: 16px;
  text-align: center;
  z-index: 2;
  width: 100%;
}

@keyframes horizontal-transfer-animation-comp {
  0%   {left: -20%; opacity: 0%;}
  10%   {opacity: 100%;}
  90%   {opacity: 100%}
  100% {left: 120%; opacity: 0%;}
}

.node-comp {
  height: 180px;
  aspect-ratio: 1/1;
  border-radius: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background-size: cover;
  background-position: center;

  transition: all ease 0.5s;

  z-index: 2;
  position: relative;

  .node-comp-border-overlay {
    height: 100%;
    aspect-ratio: 1/1;
    position: absolute;
    border-radius: 100%;
    z-index: 2;
  }

  .node-comp-animation-overlay {
    box-shadow: inset #870000 0px 0px 30px 3px, rgba(135, 0, 0, 0.66) 0px 0px 10px 5px;
    height: 100%;
    aspect-ratio: 1/1;
    position: absolute;
    border-radius: 100%;
    z-index: 1;
    animation-iteration-count: infinite;
    animation-direction: alternate;
  }
  
  .unit {
    color: #FFC541;
    font-style: normal;
    font-weight: 900;
    font-size: 22px;
    margin-bottom: -18px;
    z-index: 2;
  }
  
  .data {
    color: #fff;
    font-style: normal;
    font-weight: 900;
    font-size: 80px;
    text-shadow: 0 2px 15px #C4C4C4;
    z-index: 2;
  }
}

.node-comp::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  background-image: url('hand-pointer.png');
  background-size: 50%;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  opacity: 0; /* Hide initially */
  transition: opacity 0.3s ease-in-out;
  z-index: 3;
}

.node-comp:hover::after {
    opacity: 1;
}

.node-comp:hover {
  cursor: pointer;
}

/*@keyframes node-breathing-animation {
  from { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); }
  to { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8); }
}*/
/*
.node-comp:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}*/

.nodule-comp {
  height: 80px;
  display: inline-flex;
  justify-content: center;
  align-items: center;

  transition: all ease 0.5s;

  .image {
    height: 69px;
    aspect-ratio: 1/1;
    border-radius: 100%;
    background-image: url('default_assets/Strom.jpeg');
    background-size: cover;
  }

  .data {
    color: white;
    font-style: normal;
    font-weight: 900;
    font-size: 24px;
    margin-left: 10px;
  }

  .unit {
    font-size: 12px;
    font-weight: 900;
  }

  .data-and-unit {
    margin-bottom: -10px;
    margin-top: 0px;
    padding-left: 0px;
  }

  .arrow {
    position: absolute;
    height: 3px;
    width: 142px;
    background-color: #870000;
    color: #870000;
    margin-left: -30px;
    margin-top: 5px;
    z-index: -1;
  }

  .info {
    position: relative;
  }

  /* triangle at the end */
  .arrow::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid currentcolor; /* Adjust color for triangle */
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
  }
  /* triangle at the beginning
  (when polarity is flipped, to flip the triangle created above,
  we just flip the whole arrow and the following triangle becomes visible) */
  .arrow::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid currentcolor; /* Adjust color for triangle */
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
  }
}

.node-comp-label, .anvil-role-node-comp-label {
  z-index: 2;
  font-style: normal;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 1px;
  color:#888;
  
  position: absolute;
  left: 50%;
  border-radius: 100px;
}

.comp-node-blank {
  height: 180px;
  aspect-ratio: 1/1;
  border-radius: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(212, 176, 255, 0.46);
  transition: all ease 0.5s;
  z-index: 2;
  position: relative;
  box-shadow: 20px 20px 50px 10px gray inset;

  .label {
    font-style: normal;
    font-size: 35px;
    text-align: center;
  }
}

.comp-mobile-error-message {
  color: #ffcccb;
  padding: 15px;
  text-align: center;
  font-size: 16px;
  border: 2px solid slategray;
  margin: 20px;
  margin-top: 200px;
}

.content {
  overflow: visible;
}

.transferrail-comp {
  position: relative;
  background-color: #c92b31;
  height: 6px; /* width (length) and height are of course arbitrary in this stylsheet, since they are changed through the code */
  width: 200px;
  border-radius: 3px;
  overflow: hidden;
  transform-origin: center;
  will-change: transform;
  z-index: 0;
}

.transferrail-indicator-comp {
  width: 14px;
  height: 6px;
  background: radial-gradient(circle, rgba(255, 255, 255, .75) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 100%);
  position: absolute;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  animation-name: horizontal-transfer-animation-comp;
  z-index: 1;
  transform: scaleX(5);
  transform-origin: center;
  left: 0%;
}


.static-line-comp {
  position: relative;
  background: linear-gradient(to right, #4b0af5, #8156c9);
  height: 6px; /* width (length) and height are of course arbitrary in this stylsheet, since they are changed through the code */
  width: 200px;
  border-radius: 3px;
  overflow: hidden;
  transform-origin: center;
  will-change: transform;
  z-index: 0;
}

.transferrail-comp-label {
  position: absolute;
  display: flex !important;
  width: 100%;
  font-size: 16px;
}

.label-content {
  display: flex;
  align-items: center;
  gap: 0;
}

.label-content .data {
  color: white;
  font-weight: 400;
}

.label-content .unit {
  color: #FC5C65;
  font-weight: 300;
  margin-left: 3px;
}

.label-content img {
  margin: 7px;
  height: 20px;
}

.anvil-role-comp_title_panel {
  position: relative;
  z-index: 3;
}

.anvil-role-comp-xy-panel {
  overflow: hidden;
  margin-top: -100px !important;
}