:root {
    --primary-color: #10069F; 
    --background-light: #f8f9fa;
    --text-primary: #ffffff;
    --font-family: Arial, Helvetica, sans-serif;
  }

body {
    background-color: var(--background-light);
    font-family: var(--font-family);
    color: #333; /* Darker text for better readability */
    text-align: center;
  }

.card-style {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-radius: 8px;
  background-color: #ffffff;
  padding: 20px;
}

.latch-container {
  position: relative;
  display: flex;
  flex-direction: row; /* Horizontal layout by default */
  align-items: flex-start;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 10px;
  gap: 20px;
}

.timing-container {
  position: relative;
  margin-top: 10px;
  margin-bottom: 10px;
}

.floating-container {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-radius: 8px;
  background-color: #ffffff;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column; /* Switch to vertical stacking */
  align-items: center; /* Center them vertically */
  width: 30%;
  margin-left: auto;
  margin-right: auto;

}

#main-container {
  width: 80%;
  height: 80%;
}

.message-placeholder {
  height: 40px; 
  text-align: center; 
  margin-top: 10px;
  margin-bottom: 10px;
}

.latch-diagram {
  position: relative; 
  display: inline-block;
}

.truth-table-container {
  position: relative;
  display: inline-block; 
  margin-left: 40px;
}

h1, h3, h4 {
  color: var(--primary-color);
}

.icon {
  color: var(--primary-color);
  font-size: 3em;
}

#title {
  font-size: 3em;
}

#subtitle {
  font-size: 1.5em;
  font-style: italic;
  font-family: 'Lisel', cursive;
}
/* Oval style for headers */
.oval-lg,
.submit-btn {
	font-family: var(--font-family);
  color: #10069F;
	border-radius: 20px;
  align-items: center;
  display: inline-block;
  padding: 10px 10px;
	border: 1px solid #f5f5f5;
	outline: none;
	text-align: center;
	letter-spacing: 0.1em;
  white-space: nowrap;
	text-transform: uppercase;
	background-color: #ffffff;
	transition: all 250ms ease-in-out;
  box-shadow: 8px 8px 12px -2px rgba(72, 79, 96, 0.4), -6px -6px 12px -1px white!important;
}

.submit-btn {
  margin-top: 40px;
  margin-bottom: 40px;
  width: 40%;
  font-size: larger;
  color: #333;
}

.submit-btn:hover {
  background-color: #ffffff;
  color: #10069F;
  font-weight: bolder;
  box-shadow: none!important;
  border-color: #f3f3f3;
  cursor: pointer;
}

.oval-lg-pw {
  font-family: var(--font-family);
  color: #333;
	border-radius: 20px;
  align-items: center;
  display: inline-block;
  padding: 10px 10px;
	border: 1px solid #f5f5f5;
	outline: none;
	text-align: center;
  font-size: large;
	letter-spacing: 0.1em;
  white-space: nowrap;
	text-transform: none;
	background-color: #ffffff;
	transition: all 250ms ease-in-out;
  box-shadow: inset 6px 6px 6px -2px rgba(72, 79, 96, 0.4), inset -6px -6px 12px -1px white!important;
}

.oval-lg:focus {
  background-color: #ffffff;
  color: #333;
  font-weight: bolder;
  box-shadow: none;
  border-color: #f3f3f3;
}

input[type="text"]:focus,
input[type="password"]:focus {
  font-weight: bolder;
  box-shadow: none !important;
  border-color: #f3f3f3;
}

.g-image {
  width: 600px;
}

.al-image {
  width: 400px;
}

.ah-image {
  width: 400px;
}

.g-input-btn-s,
.g-input-btn-r,
.g-input-btn-en {
  padding: 5px 10px;
  font-size: 30px;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

.g-input-btn-s {
  position: absolute; 
  top: 55px; 
  left: 100px;
  box-shadow: inset 0 0 0 2px #d8d8d8;
}

.g-input-btn-r {
  position: absolute; 
  top: 258px; 
  left: 100px;
  box-shadow: inset 0 0 0 2px #d8d8d8;
}

.g-input-btn-en {
    position: absolute; 
    top: 186px; 
    left: 100px;
    box-shadow: inset 0 0 0 2px #d8d8d8;
}

.g-input-btn-s.active,
.g-input-btn-r.active,
.g-input-btn-en.active {
  box-shadow: inset 0 0 0 2px #6e6e6e;
}
.g-output-q {
  position: absolute; 
  top: 55px; 
  right: 10px; 
  font-size: 40px; 
  color: #b30000;
  background-color: #dddddd;
}

.g-output-q-bar {
  position: absolute; 
  top: 175px; 
  right: 10px; 
  font-size: 40px; 
  color: #10069F;
  background-color: #dddddd;
}

.al-input-btn-s,
.al-input-btn-r {
  padding: 5px 10px;
  font-size: 30px;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

.al-input-btn-s {
  position: absolute; 
  top: 60px; 
  left: 80px;
  box-shadow: inset 0 0 0 2px #d8d8d8;
}

.al-input-btn-r {
  position: absolute; 
  top: 242px; 
  left: 80px;
  box-shadow: inset 0 0 0 2px #d8d8d8;
}

.al-input-btn-s.active,
.al-input-btn-r.active {
  box-shadow: inset 0 0 0 2px #6e6e6e;
}
.al-output-q {
  position: absolute; 
  top: 40px; 
  right: 10px;  
  font-size: 40px; 
  color: #b30000;
  background-color: #dddddd;
}

.al-output-q-bar {
  position: absolute; 
  top: 178px; 
  right: 10px;  
  font-size: 40px; 
  color: #10069F;
  background-color: #dddddd;
}

.ah-input-btn-s,
.ah-input-btn-r {
  padding: 5px 10px;
  font-size: 30px;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

.ah-input-btn-s {
  position: absolute; 
  top: 55px; 
  left: 80px;
  box-shadow: inset 0 0 0 2px #d8d8d8;
}

.ah-input-btn-r {
  position: absolute; 
  top: 240px; 
  left: 80px;
  box-shadow: inset 0 0 0 2px #d8d8d8;
}

.ah-input-btn-s.active,
.ah-input-btn-r.active {
  box-shadow: inset 0 0 0 2px #6e6e6e;
}
.ah-output-q {
  position: absolute; 
  top: 40px; 
  right: 10px; 
  font-size: 40px;
  color: #b30000;
  background-color: #dddddd;
}

.ah-output-q-bar {
  position: absolute; 
  top: 173px; 
  right: 10px; 
  font-size: 40px; 
  color: #10069F;
  background-color: #dddddd;
}

.output-section p {
  font-size: 18px;
  font-weight: bold;
}

canvas {
  position: relative; 
  display: inline-block;
  border: 1px solid #6e6e6e;
}

.copyright {
  font-size: medium;
  font-style: italic;
  text-align: center;
  padding-top: 20px;;
}

.red-bg { background-color: #b30000; }

.blue-bg { background-color: #10069F; }

.blue-text { color: #10069F; }

.red-text { color: #b30000; }

.inline-display { display: inline !important; }

.hidden { display: none !important; }




#truth-table {
  padding: 10px;
  text-align: center;
  font-family: var(--font-family);
  table-layout: fixed;
  
  width: 200px;
}

#truth-table th {
  background-color: var(--primary-color);
  color: #fff;
  font-weight: bolder;
}

#truth-table td {
  border: 1px solid var(--primary-color);
}
#truth-table th,
#truth-table td {
  width: 55px;
}
#truth-table tr {
  background-color: #fffffe;
  color: #333;
}

/* Style for the first and last <th> to not apply vertical border color change */
#truth-table th:first-child,
#truth-table th:last-child {
  border-left: 1px solid var(--primary-color); /* Regular left border for first cell */
  border-right: 1px solid var(--primary-color); /* Regular right border for last cell */
}

/* Change inside vertical borders for middle <th> elements */
#truth-table th:not(:last-child) {
  border-right: 1px solid #ffffff; /* vertical border between header cells */
}

#truth-table tr.highlighted {
  background-color: #ffb549;
  font-weight: bolder;
}

#invalid-message,
#inactive-message {
  display:none; 
  color: #ff0000; 
  font-weight: bold; 
  margin-top: 10px;
}
#hold-message,
#set-message,
#reset-message {
  display:none; 
  color: #333; 
  font-weight: bold; 
  margin-top: 10px;
}

#username, 
#password {
  width: 80%;
  line-height: 2em;
  margin-bottom: 10px;
}  
/* Media query: stack elements vertically on small screens */
@media (max-width: 1080px) { 
  .latch-container {
    flex-direction: column; /* Switch to vertical stacking */
    align-items: center; /* Center them vertically */
  }
  canvas {
    width: 90%;
    height: 100%;
  }
  .floating-container {
    width: 50%;
  }
  .submit-btn {
    width: 40%;
  }
}

/* Media query: stack elements vertically on small screens */
@media (max-width: 768px) { 
  .submit-btn {
    width: 60%;
  }
  input[type="text"],
  input[type="password"] {
    font-size: x-small;
  }
  h1 {
    font-size: large;
  }
}
/* Floating menu button in the upper-right corner */
.floating-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

#menu-toggle {
  font-size: 24px;
  background-color: #ffffff;
  color: #333;
  border: 1px solid #f5f5f5;
  padding: 10px;
  cursor: pointer;
  border-radius: 30%;
  width: 50px;
  height: 50px;
  box-shadow: 8px 8px 12px -2px rgba(72, 79, 96, 0.4), -6px -6px 12px -1px white!important;
}

#menu-toggle:hover{
  background-color:#d8d8d8;
  color: #ffffff;
}

/* Hidden menu content, appears only when expanded */
.menu-content {
  display: none; /* Initially hidden */
  position: absolute;
  top: 60px; /* Position below the toggle button */
  right: 0;
  background-color: #ffffff77;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  align-items: center;
  text-align: center;
  width: 180px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Styling for menu buttons */
.menu-content button {
	color: #333;
	position: relative;
  display: inline-block;
	border: 1px solid #f5f5f5;
	outline: none;
	text-align: center;
  font-size: large;
	letter-spacing: 0.1em;
  border-radius: 20px;
	text-transform: uppercase;
	background-color: #ffffff77; 
	transition: all 250ms ease-in-out;
  width: 90%;
  cursor: pointer;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  box-shadow: 8px 8px 12px -2px rgba(72, 79, 96, 0.4), -6px -6px 12px -1px white;
}

.menu-content button:hover {
  background-color: #ffffff;
  color: #333;
  font-weight: bolder;
  box-shadow: none;
  border-color: #f3f3f3;
}
