/* Styles for the table */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.table th {
  background-color: #f2f2f2;
}

/* Styles for selected rows */
.table-row.selected {
  background-color: #d9edf7;
}

/* Styles for the code block */
.details pre {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  padding: 10px;
  margin: 0;
  overflow-x: auto;
}

.details code {
  white-space: pre-wrap;
  /* Since CSS 2.1 */
  white-space: -moz-pre-wrap;
  /* Mozilla, since 1999 */
  white-space: -pre-wrap;
  /* Opera 4-6 */
  white-space: -o-pre-wrap;
  /* Opera 7 */
  word-wrap: break-word;
  /* Internet Explorer 5.5+ */
}

.custom-width {
  max-width: 90%;
  /* or any width you prefer */
}

.custom-width-small {
  max-width: 40%;
  /* or any width you prefer */
  text-align: center;
}

.custom-width-chessclock {
  max-width: 50%;
}

#minutesInputP1, #minutesInputP2, #secondsInput {
  padding: 1px;
  padding-left: 8px;
  height: 38px;
  margin-top: 10px;
}

.modal-body-scrollable {
  max-height: calc(100vh - 200px);
  /* Maximum height based on viewport height, minus space for modal header/footer */
  overflow-y: auto;
  /* Enable vertical scrolling */
}

.toast {
  min-width: 150px;
  max-width: 500px;
  margin-top: 4px;
  /* Reduced from 10px to 5px */
  background-color: #2a2f3a;
  /* Dark blue-grey */
  color: #fff;
  /* Soft light grey for text */
  padding: 6px;
  padding-top: 3px;
  padding-bottom: 3px;
  position: relative;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  /* Subtle shadow for depth */
  display: none;
  text-align: center;
  font-size: 13px;
  border: 2px solid #4f5663;
  /* want font family to be arial bold with text stroke in black: */
  font-family: "Arial Black", Gadget, sans-serif;
  /* Text stroke effect */
  text-shadow:
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000;
}

#toast-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Align toasts to the left */
  position: fixed;
  top: 10px;
  left: 10px;
  /* Adjust this to 'left: 10px;' if you want the container on the left */
  z-index: 999999;
}

#customTooltip {
  min-width: 20px;
  margin-top: 2px;
  background-color: #2a2f3a;
  color: #fff;
  padding: 2px;
  padding-top: 2px;
  padding-bottom: 0px;
  position: fixed;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  display: none;
  text-align: center;
  font-size: 12px;
  border: 1px solid #4f5663;
  font-family: Arial, Helvetica, sans-serif;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
  pointer-events: none;
  z-index: 1000;

  white-space: nowrap;
  /* Prevents text from wrapping to a new line */
  overflow: hidden;
  /* Hides text that overflows the tooltip's width */
  text-overflow: ellipsis;
  /* Adds an ellipsis if the text overflows */
}

.radio-button-label {
  display: inline-block;
  margin: 5px;
  padding: 5px;
  border: 1px solid #ddd;
  /* optional */
  border-radius: 5px;
  /* optional */
  cursor: pointer;
}

.radio-button-label img {
  display: block;
  max-width: 70px;
  /* adjust as necessary */
  max-height: 70px;
  /* adjust as necessary */
  margin-bottom: 5px;
}

.radio-button-label span {
  display: block;
  text-align: center;
  font-size: 10px;
  /* Adjust font size as needed */
  word-wrap: break-word;
  /* Allows text to wrap */
  max-width: 80px;
  /* Set a max width for wrapping, adjust as necessary */
}

#spinner {
  position: fixed;
  top: calc(50% - 75px);
  left: calc(50% - 75px);
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(from 180deg at 50% 50%,
      rgba(82, 0, 255, 0) 0deg,
      #5200ff 360deg);
  animation: spin 2s infinite linear;
  z-index: 1000;
}

#rightClickMenu {
  min-width: 70px;
  /* Adjust as needed */
  background-color: #2a2f3a;
  color: #fff;
  padding: 2px;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  display: none;
  border: 1px solid #4f5663;
  font-family: Arial, Helvetica, sans-serif;
  z-index: 2000;
  font-size: 14px;
  /* Font size */
  position: fixed;
  /* Important for positioning the menu */
  touch-action: manipulation;
}

#rightClickMenu button.dropdown-item {
  text-align: center;
  background-color: #4e555b;
  /* Dark gray background */
  color: #ffffff;
  /* White text */
  border: none;
  /* Remove borders */
  text-align: left;
  /* Align text to the left */
  padding: 1px 1px;
  /* Padding inside the button */
  margin: 4px 0;
  /* Margin between buttons */
  width: 100%;
  /* Full width of the parent container */
  border-radius: 4px;
  /* Slightly rounded corners */
  font-size: 14px;
  /* Font size */
  transition: background-color 0.3s;
  /* Transition for hover effect */
}

#rightClickMenu img {
  width: 18px;
  height: 18px;
}

#rightClickMenu button.dropdown-item:hover {
  background-color: #636e72;
  /* Slightly lighter gray on hover */
  cursor: pointer;
  /* Change cursor to pointer */
}

#spinner::before {
  content: "";
  border-radius: 50%;
  width: 80%;
  height: 80%;
  background-color: transparent;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.show {
  transition: opacity 100ms;
}

canvas {
  -webkit-user-select: none;
  /* Safari */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* Internet Explorer/Edge */
  user-select: none;
  /* Non-prefixed version, currently supported by Chrome, Opera, and Safari */
  -webkit-tap-highlight-color: transparent;
  /* Disable tap highlight color in iOS Safari */
}

canvas {
  /*background-image: url('../images/ui/bg-large.png');*/
  background-color: #0d0d0d;
  background-size: cover;
  position: relative;
}

canvas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  /* Adjust the alpha transparency */
  pointer-events: none;
  /* Allows clicks to pass through */
}

.header {
  font-weight: bold;
  font-size: 18px;
  margin-top: 20px;
}

.sub-header {
  font-weight: bold;
  font-size: 16px;
  margin-top: 15px;
}

li {
  margin-bottom: 5px;
}

li::before {
  /*content: "• ";*/
  font-weight: bold;
}

.gm-outer {
  display: flex;
  flex-wrap: wrap;
}

.gm-inner {
  flex: 0 0 49%;
  border: thin solid rgba(0, 0, 0, 0.2);
  padding: 10px;
  font-size: 14px;
  box-sizing: border-box;
}

.helpImagecontainer {
  display: block;
  overflow: hidden;
  transition: height 0.2s ease;
  width: 100%;
  height: 100.111px;
  /* Initial height */
  border: 2px solid rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
}

.helpImagecontainer img {
  width: 100%;
  display: block;
  /* Makes each image take its own line */
  margin-bottom: -4px;
  /* Adjust as needed to remove gaps between images */
  object-fit: cover;
  /* Keeps aspect ratio and fills the height */
  border: 2px solid rgba(0, 0, 0, 0.3);
}

.helpImagecontainer h5 {
  padding-top: 10px;
}

.passoverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.content-box {
  background: white;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  width: 90%;
  max-width: 400px;
}

.small-text {
  font-size: small;
  font-style: italic;
  margin-bottom: 15px;
}

/* Adjust the button margin */
.btn {
  margin-top: 10px;
}

#zoomableIframe {
  width: 100%;
  height: 65vh;
  overflow: hidden;
  position: relative;
}

#atkCalcIframe {
  width: 100%;
  height: 65vh;
  overflow: hidden;
  position: relative;
}

.modal-title {
  text-align: center;
  width: 100%;
}

.custom-width-tactics-order-modal {
  max-width: 90%;
  /* Default for smaller screens */
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .custom-width-tactics-order-modal {
    max-width: 70%;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .custom-width-tactics-order-modal {
    max-width: 60%;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .custom-width-tactics-order-modal {
    max-width: 50%;
  }
}


.tactics-card-name {
  font-size: 26px;
}

.list-group-item {
  padding: 6px;
}

.list-group-item img {
  width: 60px;
  height: auto;
  margin-left: 10px;
}

#draggableList .list-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#draggableList .list-group-item img {
  width: 60px;
  height: auto;
  margin-right: 1rem;
}

.tactics-card-name {
  flex-grow: 1;
}

.drag-icon {
  font-size: 60px !important;
  height: 60px;
  line-height: 60px;
}

.large-image {
  transform: scale(7);
  transform-origin: left center;
  /* Adjusts the origin of transformation */
}

.move-up,
.move-down {
  cursor: pointer;
  /* Indicates these are clickable */
  transition: transform 0.3s ease;
  /* Smooth transformation */
}

.move-up {
  transform: rotate(-90deg);
  /* Rotates to point up */
  max-width: 40px;
  height: auto;
  background-color: rgba(0, 255, 0, 0.5);
  /* Green tint */
  mix-blend-mode: multiply;
}

.move-down {
  transform: rotate(90deg);
  /* Rotates to point down */
  max-width: 40px;
  height: auto;
  background-color: rgba(255, 0, 0, 0.5);
  /* Red tint */
  mix-blend-mode: multiply;
}

.delete-item, .draw-item {
  max-width: 40px;
  height: auto;
}

.modal-body {
  overflow-y: auto;
  /* Allows vertical scrolling if needed */
  max-height: calc(100vh - 200px);
  /* Example: Adjust based on modal header and footer */
}

.centered-line {
  display: flex;
  align-items: center;
  text-align: center;
  margin-top: 10px;
}

.centered-line::before,
.centered-line::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #000;
}

.centered-line:not(:empty)::before {
  margin-right: 10px;
}

.centered-line:not(:empty)::after {
  margin-left: 10px;
}

/* =========== spectator bar =========== */

.spectator-centered-container {
  position: fixed;
  top: 50%;
  right: 0.5%;
  transform: translateY(-50%);
  height: 98%;
  width: 23vh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  /*background-color: #2a2f3a;*/
  background-color: rgba(42, 47, 58, 0.75);
  border-radius: 2%;
  padding: 1vh;
  box-sizing: border-box;
  user-select: none; /* Prevent text selection */
}

.spectator-tactics-container {
  display: flex;
  flex-direction: row; /* Changed from column to row */
  align-items: center;
  justify-content: center; /* Center contents horizontally */
  width: 100%;
  user-select: none;
}

.spectator-tactics-container-img {
  height: 24vh; /* Adjust as needed */
  width: auto; /* Maintain aspect ratio */
  user-select: none; /* Prevent image selection */
}

.mission-cards-column {
  height: 24vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center the items vertically */
}

.mission-card {
  height: 6vh; /* Adjust as needed */
  width: auto; /* Maintain aspect ratio */
  margin-bottom: 0vh; /* Space between cards */
  transition: transform 0.1s ease-in-out; /* Smooth scaling transition */
  z-index: 1001;
  display: none;
}

.mission-card:hover {
  transform: scale(8); /* Scale the image up 4X on hover */
  z-index: 1100;
}

.p2, .p1 {
  font-size: 2.4vh; /* Scale text based on viewport height */
  margin: 0.2vh 0; /* Adjust margin as needed */
  color: white;
  user-select: none; /* Prevent text selection */
}

.spectator-button-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 0; /* Vertical margin */
  user-select: none; /* Prevent text selection */
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 1vh;
}

.spectator-button-image {
  height: 4vh; /* Adjust as needed */
  width: 4vh; /* Maintain aspect ratio */
  user-select: none; /* Prevent image selection */
}

.spectator-flipped {
  transform: scaleX(-1);
  user-select: none; /* Prevent image selection */
}

.spectator-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 4vh; /* Adjust as needed */
  width: 4vh; /* Ensure it's a square */
  margin: 0.2vh 0; /* Adjust margin as needed */
  border-radius: 1vh; /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add some depth */
  font-size: 2.5vh; /* Scale text based on viewport height */
  font-weight: bold;
  color: white;
  user-select: none; /* Prevent text selection */
}

#spectator-graybtn {
  background-color: #666; /* Gray background */
}

#spectator-greenbtn {
  background-color: #28a745; /* Green background */
}
.image-wrapper {
  position: relative;
}
.overlay-text-top {
  position: absolute;
  bottom: 0.5vh; /* Adjust as needed to position text at the bottom */
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap; /* Prevent line break */
  font-size: 1.9vh; /* Adjust as needed */
  font-weight: bold;
  color: white; /* Adjust as needed */
  text-shadow: 
    0.3vh 0 0 black, 
    -0.3vh 0 0 black, 
    0 0.3vh 0 black, 
    0 -0.3vh 0 black; /* Add white text shadow */
  user-select: none; /* Prevent text selection */
}


/* ========= Spec Dice Styles ========= */

.dice-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-left: 1.7vh;;
}

.dice-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0.1vh 0; /* Adjust margin as needed */
}

.dice-wrapper {
  position: relative;
  height: 4vh;
  width: 4vh;
}

.dice-image {
  height: 4vh; /* Adjust as needed */
  width: 4vh; /* Maintain aspect ratio */
  user-select: none; /* Prevent image selection */
  opacity: 0; /* Start with the image invisible */
  transition: opacity 0.34s ease-in-out; /* Smooth transition for the opacity */
}

.dice-image.fade-in {
  opacity: 1; /* Fade-in to fully visible */
}

.dice-image.show-immediate {
  opacity: 1; /* Make the image fully visible immediately */
  transition: none; /* No transition effect */
}

.dice-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(255, 204, 0, 0.3); /* Default to 30% transparent gold */
}

.gold-overlay {
  background-color: rgba(255, 215, 0, 0.3); /* 30% transparent gold */
}

.blue-overlay {
  background-color: rgba(57, 126, 255, 0.3); /* 30% transparent blue */
}

.overlay-text {
  position: absolute;
  left: -2vh; /* Adjust as needed to position text on the left side */
  top: 50%;
  transform: translateY(-50%);
  font-size: 3vh; /* Adjust as needed */
  font-weight: bold;
  color: white; /* Adjust as needed */
  user-select: none; /* Prevent text selection */
  font-weight: bold;
  text-shadow: 
    0.3vh 0 0 black, 
    -0.3vh 0 0 black, 
    0 0.3vh 0 black, 
    0 -0.3vh 0 black; /* Add white text shadow */
}

/* ========= Overlay Styles ========= */

.spectator-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  user-select: none; /* Prevent text selection */
}

.spectator-overlay-image {
  height: 90%;
  width: auto;
  max-height: 90%;
  max-width: 90%;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  object-fit: contain; /* Ensure it maintains its aspect ratio */
  user-select: none; /* Prevent image selection */
}

.spectator-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#spectator-overlay-image {
  height: 90vh;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

