body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans,
    Helvetica Neue, sans-serif;
  color: hsl(var(--color-primary-text));
  --tw-bg-opacity: 1;
  background-color: hsl(var(--color-primary-default) / var(--tw-bg-opacity));
  padding: 2rem;
  display: flex;
  justify-content: center;
  
}

table{
border-spacing: 0;
border-collapse:collapse ;
table-layout: fixed; 
width: 100%;
height: 100%;


}

td {
  border: 1px solid rgb(204, 204, 204);
 
  vertical-align: top;
  text-align: left;
  box-sizing: border-box;
  user-select: none;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  z-index:1;

  min-width: 6rem;
  max-width: auto;
  float: center; 
  
}

.event-container img {  
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /*object-fit: contain;*/
  position: absolute;
  max-width: 100%;
  max-height: 80%;
  margin: 0; /*THIS WILL MOVE THE IMAGE HORIZONTALLY*/
  padding: 0;
  z-index:-1;
}



.calendar-container {
  border: 1px solid hsl(var(--color-secondary-light));
  border-radius: 0.5rem;
  position: absolute; /*or relative*/
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%; 
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 1rem;
}

.calendar-grid {
  display: table;
  width: 100%;
  /*height: 340px;*/
  /*width: 4rem;*/
  /*table-layout: fixed;*/
  border-collapse: collapse;
}

.calendar-grid td {
  border: 1px solid rgb(204, 204, 204);
  vertical-align: top;
  box-sizing: border-box;
  user-select: none;
  position: relative;
  overflow: hidden;
  height: 6rem;  /* CONROLS CELL HEIGHT */
}

.day {
  height: 100%;
  line-height: 100%;
  position: relative;
  overflow: hidden;
  padding: 0px;  /* Adjust as needed */
  vertical-align:top;
  z-index:1;
}


.empty {
  background-color: hsl(var(--color-secondary-lighter));
}

 .day:not(.empty)::before {
  content: attr(data-day);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: top;
  font-size: 0.8rem;
  font-weight: bold;
  color: hsl(var(--color-secondary-contrast));
  background-color: hsl(var(--color-secondary-darker));
  border-radius: 0.5rem;
  vertical-align: top;
} 

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  max-width: 100%;
  max-height: 100%;
  width:100%;
  height: 100%;
  
  /*background-color: rgb(238, 235, 235); /*THIS IS THE COLOR COVERING THE BACKGROUND*/
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: .6; /*0.6;*/
  /*z-index: 1050;*/
}

.modal-inner {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: rgba(255, 255, 255, 0.85); /* White with 50% opacity */
  padding-top:0;
  padding: 2rem;
  width: 30%; /*CONTROLS WIDTH OF MODAL WINDOW RELATIVE TO PAGE*/
  height: auto;
  /* max-width: 100%;  /* Adjust for your needs */
 /*  max-height: 100%;  /* Adjust for your needs */
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
  outline: 0;
  /*z-index: 1;*/
  animation: fadein 0.5s linear;
  text-align:center;
  line-height: .75rem;
  font-size: .75rem;
}

.modal-inner img {
  
  max-width: 50%; /* CONTROLS SIZE OF IMAGE IN MODAL */
  max-height: 50%;
  width: 100%;
  height: auto;
  z-index: -1;
  vertical-align:top;
}

.modal-content {
  position: relative;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: normal;
}

.modal-subtitle {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  color: hsl(var(--color-secondary-base));
}

.modal-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
  place-self: end;
  margin-top: 1rem;
}

.modal-close-button {
  align-self: center;
}

@keyframes fadein {
  from {
    transform: translate(-50%, -50%) scale(0);
  }
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 767px) {
  .modal-inner {
    max-width: 270px;  /* Adjust for your needs */
    max-height: 100%;  /* Adjust for your needs */
    width: 100%;
    height: auto;
    
  }
  .calendar-container {
    width: 100%; /*fit-content;*/
    height: 100%;
  }

  .modal-inner img {
    max-width: 100%;
    height: auto;
  }

}

@media (min-width: 768px) and (max-width: 1199px) {
  .modal-inner {
    max-width: 80%;
    max-height: 80%;
    /*height: 5px;*/
    padding: 1.75rem;
  }
}

@media (min-width: 1200px) {
  .modal-inner {
    max-width: 70%;
    max-height: 70%;
    padding: 2rem;
  }
}
