/* Basic styling for center alignment */
.richcast-overlay-wrapper {
  position: absolute;
  top: 0%;
  left: 0%;
  bottom: 0%;
  right: 0%;
  display: none;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
  background-color:transparent;
  transform: scale(1);
  transform-origin: center;  
}

/* Sign-in box styling */
.signin-box {
  width: 20rem;
  padding: 15px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.signin-box h2 {
  color: #808080;
  text-align: left;       
  font-weight: unset;
  display: inline;
  margin: 0px;
}

/* Input field styling */
.signin-box input,
.signin-box input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  border-color:808080;
  box-sizing: border-box;
  background-color: #E9E9EA;
  font-size: small;
}

.signin-box .description {
  margin-top: 20px;
  color: #808080;
  text-align: justify;
  font-size: small;
}

.signin-box .description a {
  color: #AF53A6;
  text-decoration: underline;
  cursor: pointer;
  font-size: small;
}

.signin-box .horizontal-space {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  margin: 20px 0;
}

.signin-box .dropdown {
  width: 100%;
  height: 30px;
  background-color: #E9E9EA;
  margin-right: 10px;
  margin-left: 10px;
  border-color:808080;  
  border: 1px solid #ccc;
  border-radius: 5px;
  color: #808080;
}

/* Button styling */
.signin-box .buttons {
  display: flex;
  justify-content: space-evenly;
  margin-top: 20px;
}

.signin-box button {
  width: 48%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: medium;
}

.signin-box button.ok {
  background-color: #AF53A6;
  color: white;
  border-radius: 10px;
  width: 100%;
}

.signin-box button.cancel {
  background-color: #f44336;
  color: white;
}

.signin-box button:hover {
  opacity: 0.9;
}

.signin-box .header {
  display: flex;
  align-items: start; 
  justify-content: space-between; /* Push elements to the edges */
}

.signin-box .centre {
  display: flex;
  align-items: center; 
  justify-content: space-between; /* Push elements to the edges */
}

.signin-box .header .close-button {
  background: none; /* Remove background */
  border: none; /* Remove border */
  font-size: 20px; /* Make the X larger */
  cursor: pointer; /* Change cursor to pointer on hover */
  width: auto;
  height: auto;
  padding: 0;
}

.signin-box .header .close-button img {
  filter: brightness(0) invert(1);
  pointer-events: none; 
}


.signin-box .header .close-button:hover {
  color: red; /* Optional hover effect */
}

.loader-spinner {
	width: 100%;
	height: 100%;
	margin: auto;
	opacity: 1;
  animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
}

.spinner-container {
	width: 80px;
	height: 80px;
	margin: auto;
}

/* QR Scanner Styling */
#qr-scanner-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#qr-scanner {
  width: 300px;
  height: 300px;
  border: 2px solid #fff;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

/* Style the video element inside the scanner */
#qr-scanner video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  position: absolute;
  top: 0;
  left: 0;
}

/* Style the canvas element used by html5-qrcode */
#qr-scanner canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  position: absolute;
  top: 0;
  left: 0;
}

/* Ensure html5-qrcode internal elements fill the container */
#qr-scanner #qr-shaded-region {
  width: 100% !important;
  height: 100% !important;
}

#qr-scanner #qr-code-full-region {
  width: 100% !important;
  height: 100% !important;
}

/* Force the video stream to fill the entire area */
#qr-scanner div {
  width: 100% !important;
  height: 100% !important;
}

/* Remove any white backgrounds from html5-qrcode elements */
#qr-scanner div[style*="background"] {
  background: transparent !important;
}

/* Target specific html5-qrcode overlay elements */
#qr-scanner div[style*="position: absolute"] {
  background: transparent !important;
}

/* Remove white backgrounds from any child divs */
#qr-scanner > div > div {
  background: transparent !important;
}

/* Ensure the scanning overlay region is transparent */
#qr-scanner .qr-code-full-region {
  background: transparent !important;
}

/* Make sure any positioning overlay is transparent */
#qr-scanner div[style*="z-index"] {
  background: transparent !important;
}

/* Aggressively remove any white backgrounds from html5-qrcode */
#qr-scanner * {
  background-color: transparent !important;
  background: transparent !important;
}

/* But keep the video and canvas visible */
#qr-scanner video,
#qr-scanner canvas {
  background: #000 !important;
}

#qr-scanner-close {
  margin-top: 20px;
  padding: 12px 24px;
  background-color: #AF53A6;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease;
  width: 200px;
}

#qr-scanner-close:hover {
  opacity: 0.9;
}

/* QR Result Display */
#qr-result-display {
  margin: 20px 0;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid #fff;
  border-radius: 6px;
  max-width: 400px;
  text-align: center;
}

#qr-result-label {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

#qr-result-text {
  color: #00ff00;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  white-space: pre-wrap;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #333;
}

/* Responsive QR Scanner for mobile devices */
@media (max-width: 480px) {
  #qr-scanner {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 320px) {
  #qr-scanner {
    width: 250px;
    height: 250px;
  }
}
