
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: rgb(255, 255, 255);
    font-family: "Quicksand", sans-serif;
  }
  
  html {
    font-size: 62%;
  }
  
  @keyframes slideIndown{
	from{
		transform: translate(-50%, -100%);
	}
	
	to{
		transform: translate(-50%, 55px);
	}
}

@keyframes slidedownhide{
	from{
		transform: translate(-50%, 55px);
	}
	
	to{
		transform: translate(-50%, -100%);
		
	}
}
  
  .calendar {
    position: fixed;
    top: 0%;
    left: 50%;
    animation: slideIndown 1000ms forwards;
    /*transform: translate(-50%, 55px);*/
    display: none;
    /* position: relative; */
    text-align: center;
    border-radius: 1.2em;
    margin: auto;
    width: min(38rem, calc(100vw - 24px));
    height: auto;
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px - env(safe-area-inset-bottom, 0px));
    padding-bottom: 1.6rem;
    background-color: #fff;
    box-shadow: 0 0.5rem 3rem rgba(0, 0, 0, 0.4);
    z-index: 1001;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  
  .calendar[closing] {
    position: fixed;
    top: 0%;
    left: 50%;
    animation: slidedownhide 500ms forwards;
    /*transform: translate(-50%, 55px);*/
    display: none;
    /* position: relative; */
    text-align: center;
    border-radius: 1.2em;
    margin: auto;
    width: min(38rem, calc(100vw - 24px));
    height: auto;
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px - env(safe-area-inset-bottom, 0px));
    padding-bottom: 1.6rem;
    background-color: #fff;
    box-shadow: 0 0.5rem 3rem rgba(0, 0, 0, 0.4);
    z-index: 1001;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .month {
    width: 100%;
    height: 12rem;
    border-radius: 1.2em 1.2em 0em 0em;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    text-align: center;
    text-shadow: none;
  }
  
  .month i {
    font-size: 2.2rem;
    cursor: pointer;
	color: #5E5E5E;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .month i:hover {
    background-color: #F1F5F9;
  }
  
  .month h1 {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 0.2rem;
    margin-bottom: 1rem;
  }
  
  .month p {
    font-size: 1.6rem;
  }
  
  .weekdays {
    width: 100%;
    height: 5rem;
    padding: 0 0.4rem;
    display: flex;
    align-items: center;
  }
  
  .weekdays div {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.1rem;
    width: calc(40rem / 7);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    text-shadow: none;
  }
  .date p {
    font-size: 2rem;
    margin: 0.3rem;
    height: 5rem;
    display: flex;
    color: #000;
    justify-content: center;
    align-items: center;
  }
  .days {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0.2rem;
  }
  
  .days div {
    position: relative;
    font-size: 2.2rem;
    line-height: 2.2rem;
    margin: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #000;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  }
  /* .days div p{
    font-size: 1rem;
    margin: 0.3rem;
    display: block;
    justify-content: center;
    align-items: center;
    color: #fff;
    /transition: background-color 0.2s; 
  } */

  .days .date_element {
    color: #111827;
    font-weight: 700;
    cursor: pointer;
  }

  .days .today {
    color: #111827;
    font-weight: 700;
    cursor: pointer;
    border: none;
  }

  .days .next-date,
  .days .prev-month-date {
    color: #4B5563;
    font-weight: 500;
    cursor: pointer;
    opacity: 1;
  }

  .days .prev-date {
    color: #E5E7EB;
    font-weight: 500;
    cursor: default;
    opacity: 1;
  }
  
  .days .date_element:hover,
  .days .today:hover {
    background-color: #F1F5F9;
    color: #EA580C;
    border: none;
    cursor: pointer;
  }

  .days .next-date:hover,
  .days .prev-month-date:hover {
    background-color: #FFF7ED;
    color: #EA580C;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
  }

  .days .prev-date:hover,
  .days .offday:hover,
  .days .offday_today:hover {
    background: transparent;
    border: none;
    cursor: default;
    color: inherit;
  }

  .days .selected,
  .days .today.selected,
  .days .date_element.selected,
  .days .next-date.selected,
  .days .prev-month-date.selected {
    color: #0F172A;
    font-weight: 700;
    background-color: #fff;
    border: 2px solid #0F172A;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 2px rgba(15, 23, 42, 0.1);
    cursor: pointer;
  }

  .days .selected:hover,
  .days .today.selected:hover,
  .days .date_element.selected:hover,
  .days .next-date.selected:hover,
  .days .prev-month-date.selected:hover {
    background-color: #fff;
    color: #0F172A;
    border: 2px solid #0F172A;
  }
  
  .offday,
  .offday_today {
    opacity: 0.3;
    cursor: default;
  }

  .days div p {
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    font-weight: 500;
  }

  .offday p,
  .prev-date p,
  .today p,
  .date_element p,
  .offday_today p {
    color: #000;
  }

  .next-date p,
  .prev-month-date p {
    color: #4B5563;
  }

  .calendar-legend {
    margin: 1.2rem 1.2rem 0;
    padding: 1.2rem 0.8rem 0;
    border-top: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .calendar-legend-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.8rem;
    color: #64748B;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  .calendar-legend-item span {
    color: #64748B;
    font-size: 1.5rem;
    white-space: nowrap;
  }

  .calendar-legend-swatch {
    display: inline-block;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .calendar-legend-selected {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 4px;
    border: 2px solid #0F172A;
    background: #fff;
  }

  .calendar-legend-available {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #0F172A;
  }

  .calendar-legend-next {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #94A3B8;
  }

  .calendar-legend-disabled {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #E2E8F0;
  }

@media (max-width: 480px) {
  .calendar,
  .calendar[closing] {
    padding-bottom: 1rem;
  }

  .month {
    height: 7rem;
    padding: 0 1.2rem;
  }

  .month h1 {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
  }

  .date p {
    height: auto;
    font-size: 1.6rem;
    margin: 0;
  }

  .weekdays {
    height: 3.2rem;
  }

  .weekdays div {
    width: calc(100% / 7);
  }

  .days div {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-height: none;
    font-size: 2rem;
    line-height: 2rem;
  }

  .calendar-legend {
    margin: 0.6rem 0.8rem 0;
    padding: 0.8rem 0.2rem 0;
    gap: 0.8rem;
  }

  .calendar-legend-item {
    font-size: 1.4rem;
    gap: 0.4rem;
  }

  .calendar-legend-item span {
    font-size: 1.4rem;
  }
}
