@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --rh-max-width           : 1200px;
  --rh-min-width           : 360px;
  --rh-br                  : 15px;

  --rh-primary-color    : #d5d5d5; 

  --rh-active-color     : #4CAF50;
  --rh-idle-color       : rgb(255, 145, 0);
  --rh-stopped-color    : red;
  /* --rh-stopped-color    : pink; */

  --rh-whiteFA-color    : #fafafa;
  --rh-switch-bg-color  : #bebebe;
  --rh-tx-color         : #333;

  /* offset-x | offset-y | blur-radius | color */
  --rh-shadow           : 2px 2px 2px rgba(0, 0, 0, 0.075);
}

html, body {
  font-family: "Roboto", sans-serif;
  background-color: var(--rh-primary-color);
  scroll-behavior: smooth;
  text-align: center;
  min-height: 100dvh;
}

/* IBM3090 Simulator------------------------------------------- */
.header {
  display: flex;
  justify-content: center;
}

.nav__bar {
  position: fixed;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  z-index: 9;
}

.nav__header {
  background-color: var(--rh-active-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.nav__logo p {
  color: var(--rh-whiteFA-color);
  font-size: 1.2rem;
  font-weight: 400;
}
/* ------------------------------------------------------------ */
.switch__header {
  display: flex;
  justify-content: center;
  align-items: center;
  /* border-bottom: 1px solid var(--rh-tx-color); */
  /* margin-bottom: 15px; */
}

.switch {
  margin-top: 60px;
  position: relative;
  display: inline-block;
  /* width: 60px; */
  width: 50px;
  /* height: 34px; */
  height: 25px;
  margin: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--rh-switch-bg-color);
  transition: .4s;
  /* border-radius: 34px; */
  border-radius: 25px;
}

/* the switch red ball */
.slider:before {
  position: absolute;
  content: "";
  /* height: 26px;
  width: 26px; */
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: var(--rh-stopped-color);
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider:before {
  background-color: var(--rh-active-color);
  /* transform: translateX(26px); */
  transform: translateX(26px);
}

#statusMessage {
  font-size: 1.5rem;
}
 
#statusMessage.blink
{
  animation: blink-red 1s infinite;
}

/* ------------------------------------------------------------ */

main {
  display:flex; 
  flex-direction: column; 
  max-width: var(--rh-max-width);
  min-width: var(--rh-min-width);
  margin-inline: auto;
  padding-top: 60px;
}
.main__botton {
  display: flex;
  flex-direction: row;
}

.main__parData {
  width: 300px;
}

.main__table {
  width: calc(var(--rh-max-width) - 300px);
  display: flex;
  flex-direction: column;
  /* align-items: start; */
  /* justify-content: center; */
}

.main__sections {
  margin: 0px 10px 10px 10px;
  padding: 5px;
  border-radius: var(--rh-br);
  box-shadow: var(--rh-shadow)
}

.main__parameters {
  /* background-color: pink; */
  background-color: var(--rh-switch-bg-color);
  background-color: #f2f2f2;
}

.secundary__parameters {
  /* background-color: rgb(194, 165, 1); */
  background-color: #f2f2f2;

}

.main__vars {
  /* background-color: rgb(183, 235, 255); */
  background-color: #f2f2f2;
}

.main__cpus {
  /* background-color: rgb(110, 241, 191); */
  background-color: #f2f2f2;
}

.p1 {
  display: flex;
  justify-content: space-between;
  color: var(--rh-tx-color);
  text-align: left;
  padding-left: 5px;
  padding-right: 5px;
  padding-bottom: .07rem;
}

.p1 input {
  text-align: right;
  /* background-color: rgb(179, 175, 175); */
  border: .25px solid var(--rh-switch-bg-color);
  border-radius: 5px;
  padding-right: 5px;
}

#cycleIDUI {
  font-size: .75rem;
}

.stopped {
  background-color: var(--rh-stopped-color);
  color: var(--rh-whiteFA-color) !important;
  transition: .3s ease-in-out;
  padding: 0px 5px;
  border-radius: 5px;
}

.idle {
  background-color: var(--rh-idle-color);
  color: var(--rh-whiteFA-color) !important;
  transition: .3s ease-in-out;
  padding: 0px 5px;
  border-radius: 5px;
}

.active {
  background-color: var(--rh-active-color);
  color: var(--rh-whiteFA-color) !important;
  transition: .3s ease-in-out;
  padding: 0px 5px;
  border-radius: 5px;
}

/* ------------------------------------------------------------ */
.footer {
  /* position: sticky; */
  bottom: 0;
  display: flex;
  justify-content: center;
  margin-top: 20px;
  /* height: 40px; */
}

.footer__bar {
  padding: 5px 0px 5px 0px;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  background-color: var(--rh-active-color);
}

.footer__header {
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 1rem; */
}

.footer__logo a {
  color: var(--rh-whiteFA-color);
  font-size: .75rem;
  text-decoration: none;
}

/* ------------------------------------------------------------ */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  background-color: var(--rh-idle-color);
  color: var(--rh-whiteFA-color);
  text-align: center;
  border-radius: 5px;
  padding: 10px;
  position: absolute;
  z-index: 1;
  bottom: 35%; /* Tooltip location above the button */
  left: 500%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.9em;
  width: 200px;
  /* offset-x | offset-y | blur-radius | color */
  box-shadow: var(--rh-shadow);
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Blink animation for pause/resume button */
@keyframes blink-active {
  0% {
      color: var(--rh-whiteFA-color);
      background-color: var(--rh-active-color);
    }
    25% {
      /* color: var(--rh-active-color); */
      background-color: var(--rh-switch-bg-color);
    }
    100% {
      color: var(--rh-whiteFA-color);
      background-color: var(--rh-active-color);
  }
}

#statusMessage.blink {
  animation: blink-active 1s infinite;
  transition: .3s ease-in-out;
  padding: 0px 5px;
}

/* .main__table__container {
  margin: 0px 0px 10px 0px;
  padding: 10px 10px 0px 10px;
  border-radius: var(--rh-br);
  box-shadow: var(--rh-shadow);

  width: 80%;
  border: 1px solid #ccc;
  overflow-y: auto;
  height:     310px; 
  max-height: 360px; 
}  */
  /* max-height: 360px; -> Limit height for scrolling  */


table {
  width: 100%;
  margin: 0px 10px;
  border-collapse: collapse;
  border-radius: var(--rh-br);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

th, td {
  text-align: center;
  padding: 10px;
  font-size: .75rem;
}

th {
  color: var(--rh-whiteFA-color);
  font-weight: 400;
}

.tableQueue tr:first-child th {
  font-size: 1rem;
  border-bottom: 1px solid white;
  background-color: var(--rh-active-color);
}

.tableQueue thead th {
  color: var(--rh-tx-color);
}

tbody tr:nth-child(odd) {
  background-color: #f2f2f2;
}

tbody tr:nth-child(even) {
  background-color: #ffffff;
}

tbody tr:last-child td {
  border-bottom: none;
}

tfoot {
  background-color: #e0e0e0;
  font-weight: bold;
}

tfoot tr td {
  border-bottom: none;
}

tr.active td {
  background-color: #45f200;
  background-color: var(--rh-idle-color);
  color: var(--rh-whiteFA-color);
  transition: background-color 5s, color 5s;
}

/* tr.inactive {
  display: none;
} */


@media (width<400px) {
  .main__botton {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  table {
    /* width: 90%; */
    margin: 10px 10px;
  }

  .main__table {
    width: var(--rh-min-width);
}
  .main__table__container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: var(--rh-min-width);
  }
}