@media screen and (min-device-width: 1023px)  {
    .mobile { display: none!important; }
    canvas { display:none!important; }
}
@media screen and (max-device-width: 1024px)  {
    .desktop { display: none; }
}

/* 1) Put the family on body (more reliable than * in Safari) */
html, body {
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI",
               Roboto, Arial, "Helvetica Neue", sans-serif;
}

/* 2) Make everything else inherit it */
* { font-family: inherit; }

/* 3) Force form controls to inherit (Safari often ignores universal selector) */
input, button, select, textarea {
  font: inherit;              /* includes size/weight/line-height */
}


html, body {
/*   height:90vh!important; */
  overflow-x:hidden;
  margin: 0; 
  padding: 0; 
  background-color: #000000; 
}

layer {
  background-color: #000000; /* For browsers that do not support gradients */
  background-image: url('../img/layer2bg.jpeg');
}

.desktop {
	background-color: #ffffff; /* For browsers that do not support gradients */
	background-image: none;
}

layer, .desktop {
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  height:100vh;
  position:absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y:auto;
  overflow-x:hidden;
}

#layer1 {
  position:absolute;
  z-index:4;
}
canvas {
  position:absolute;
  z-index:3;
}
#layer2  {
position:absolute;
  z-index:2;
}
#layer3 {
position:absolute;
  z-index:1;
}

/*Layer 1*/
.top {
  position:relative;
  margin-top:20vh;
  margin-left: auto;
  margin-right: auto;
  text-align:center;
}
.top img {
	max-width:40vw;
	max-height:30vh;
}

.mid {
  height:55vh;
  width:100%;
  position:absolute;
  bottom:10vh;
  text-align: center;
}

.mid p {
  margin-top:25vh;
  font-size:1.5em;
  font-weight:600;
  color:black;
}
/*Layer 1*/


/*Layer 2*/
.logout, .staff-id-number {
  position: fixed; 
  bottom: 0;
  left: 0;
  right: 0;
  font-weight:600;
}
.logout {
  top:1%;
  left:68%;
  width:135px;
  height:30px;
  background:none;
  border:none;
  color:#fbd862;
  font-size:1.2em;
  vertical-align:middle;
  z-index:1;
}

.logout div, .logout img {
	display:inline-block;
	vertical-align:middle;
}

.logout img {
	height:20px;
	padding-left:2.5px;
}

.staff-id-number {
  color:#fbd862;
  top: 5.5%;
  right:7%;
  text-align:right;
  font-size: 1em;
}

.midsection {
  padding-top:12%;
  text-align:center;
}

.geadd2 { 
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.geadd2 {
  max-height:80vh;
  max-width:80vw;
}


.name {
	color:white;
	font-size:1.2em;
	margin-bottom:2px;
	font-weight:600;
	text-align:center;
	min-width: 45%;
	max-width: 100%;
    text-transform:uppercase;
    margin-top:5px;
    margin-bottom:30px;
}

.btmsection {
	margin:0 10px;
	text-align:center;
	display:grid; 
	gap: 5px;
  	grid-template-columns: 1fr 1fr;
  	align-items:start; 
}
.dietsection {
	grid-template-columns: auto 1fr;
	align-items: center;
	margin-bottom:25px;
	margin-left:10%;
	margin-right:10%;
	gap:20px;
}
.diet-label {
	text-align:left;
	color:#fbd862;
	font-size:1em;
	font-weight:600;
}

.lucky-label, .table-label, .qr-label, .right-label {
	color:#fbd862;
	font-size:1em;
	margin-bottom:10px;
	font-weight:600;
}

.lucky, .table, .diet, .qr {
	font-size:1.2em;
	background:white;
	border-radius: 25px;
	margin:auto;
	margin-bottom:20px;
	padding:4px;
	font-weight:600;
}

.diet {
	margin-bottom:0px;
	padding-left: 15px;
    padding-right: 15px;
}
.lucky, .table {
	min-width: 30%;
	max-width: 60%;
}

.qr {
	border-radius: 15px;
	width:60%;
}

.qr img, img.qr-code  {
	width:100%;
	border-radius: 15px;
	vertical-align:middle;
}

.flex-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.box {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1px 10px;
}

.spacer {
    width: 30%;
    height: 10%;
    margin: 2px;
}

/* Modal base styles */
.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    margin: 15% auto;
    padding: 30px 10px;
    width: 85%;
    height:fit-content;
    text-align:center;
    background-image: url('../img/modalbg.png');
    -webkit-background-size: contain;
	-moz-background-size: contain;
	-o-background-size: contain;
	background-size: contain;
	background-repeat: round;
	min-height:50%;
}

.modal-title {
	height:50px;
	padding-top:15px;
}
.modal-text {
    padding: 0px 20px;
}
.modal-text strong {
    font-weight:600;
}
/* Close button styles */
.close-btn {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: -15px;           /* hang outside; use 12px to keep it inside */
  width: 15%!important;
  height: auto;
  cursor: pointer;
  display: block;
}

.close-btn:hover, .close-btn:focus {
    opacity: 0.7;
    text-decoration: none;
}
/*QR Modal*/
div#qr-code-container {
	padding:1em 25px 4em 25px;
}

/*Agenda Modal*/
#agendaModal .modal-content {
    background-image: url('../img/agendamodalbg.png');
}

#agendaModal .modal-text {
    margin-top:0.6em;
    font-weight:600;
    font-size:0.8em;
    text-align: left;
    padding: 0px 30px;
}
#agendaModal .modal-content{
	padding-bottom:10px;
}
#agendaModal table {
    border-collapse: collapse;
    width: 100%;
        
}
#agendaModal tbody {
	vertical-align: top;
}
#agendaModal th:first-child, 
#agendaModal th:last-child {
	color:#d9620e;
	font-size:1.25em;
	padding: 10px 10px;
}

#agendaModal tr{
		border-bottom: 0.8px solid #d9620e;
}
#agendaModal tr:nth-last-child(-n+3) {
  border: none;
}

#agendaModal td:first-child {
        padding: 5px 10px;
}
#agendaModal td:last-child {
		padding: 5px 10px;
}

/*Table Seating*/
#tableModal .modal-title{
	height:80px;
}
/* Container should clip and let us handle touch gestures */
#table-container{
  position: relative;
  overflow: hidden;
  margin:1em 25px 0.5em 25px; /* keep your padding */
  touch-action: none;        /* enable custom pinch/drag */
  border: 4px solid #d3b67d;
}

/* The zoomable image */
#table-container .table-number{
  display:block;
  width:90%;
  height:auto;
  user-select:none;
  -webkit-user-drag:none;
  will-change: transform;
  transform-origin: 0 0;     /* simplify math */
  margin:10px auto;
}

/* Slight smoothing when we programmatically zoom/reset (not during drag/pinch) */
#table-container .table-number.smooth { transition: transform .18s ease-out; }

#tableModal .pinch {
	width:50%;
	margin-bottom:3em;
}

/*Draw Revealed*/
#drawModal .modal-content {
	min-height:60%;
}
.bonanza-div {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top:70px;
  margin-bottom:90px;
}

/* Ensure the canvas shows with a correct height */
#scratchCanvas {
  position: absolute;
  width: 65%;   /* or whatever size you want */
  z-index: 2;
}

#scratchCanvas.fade-out {
  opacity: 0;
  transition: opacity .4s ease;
}

.scratch-btn {
  position: absolute;
  width:65%;
  z-index: 2;
  transition: opacity .5s ease, transform .5s ease; /* fade when we auto-reveal */
  cursor: pointer;
}

.scratch-btn.fade-out {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.draw-result {
  min-height:150px;
  max-height:150px;   /* adjust to match canvas */
  z-index: 1;   /* sits under the canvas */
  opacity: 1;   /* always visible */
}


#drawModal .modal-text {
	font-size:1.2em;
}


/* Modal base styles */

/*mobile small screen*/
@media screen and (max-width: 380px)  {
    #layer2 { font-size:0.8em; }
    .box { height:30px!important; }
    .lucky, .name, .table, .qr { padding:2px;}
    #drawModal .modal-content { min-height:70%; }
}

/*SCROLL BAR CSS */

/* Scrollbar Track */
.simplebar-track.simplebar-vertical {  
  background: linear-gradient(to top, #fbd862, #c1750d);
  border-radius: 6px;  
}


/* Scrollbar Thumb (the draggable part) */
.simplebar-scrollbar:before, .simplebar-scrollbar.simplebar-visible:before{
  box-shadow: 0 0 3px #000;
  opacity:1;
  background: #fff;
  border-radius: 6px; 
  width:11px;
  left:0px;
}

/*SCROLL BAR CSS */

/*Layer 2*/

/*Layer 3*/
.layer3 {
  height:100vh;
  width:100vw;
  position:fixed;
  z-index:-1;
  background-image: url('../img/layer3.jpeg');
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  -webkit-background-position: center;
  -moz-background-position: center;
  -o-background-position: center;
  background-position: center;
}


.timer, .time-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer {
  padding-top:10vh;
  color:white;
  gap: 20px; /* Adjust the gap if needed */
  flex-direction: row;
}

.time-section {
  flex-direction: column;
  font-weight:600;
}

.time-number {
  font-size:2em;
}
.time-label {
  font-size: 0.7em; 
  margin-top: -0.35em;
}

.time-colon {
  font-size: 2em; /* Match with the timer numbers */
  display: flex;
  align-items: center;
}

.geadd { 
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.geadd {
  padding-top:5vh;
  max-height:80vh;
  max-width:80vw;
}

.date, .signin {
  
  display: block;
  margin-left: auto;
  margin-right: auto;
  color:white;
  text-align:center;
}
.date {
  padding-top:4vh;
  font-size: 1em;
  font-weight:600;
}

.signin {
  position: absolute;
  bottom: 16vh;
  left: 0;
  width: 100%;
}

.idinput {
	width:60%;
	padding:10px;
	border-radius:25px;
	text-align:center;
	vertical-align:middle;
	font-size:1.1em;
	font-weight:600;
	border: none;
}


.idlogin {
	height:40px;
	padding-left:5px;
	vertical-align:middle;
}

.animate__slowed {
  --animate-duration: 6s;
}

/*Layer 3*/

/*Loader*/
.overlay {
  z-index: 998;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0,0,0,0.5); /* Semi-transparent black */
  z-index: 9998; /* Ensure it appears above most items but below the loader */
  display: none; /* Initially hidden */
}
.loader {
  z-index: 999;
  border: 12px solid #f3f3f3;
  border-top: 12px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 2s linear infinite;
  position: fixed;
  top: 43%;
  left: 43%;
  transform: translate(-50%, -50%);
  display: none; /* Initially hidden */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/*Loader*/
