.calendar-container {
  max-width: 560px;  
  width: 100%;
  font-family: Lexend Deca;
  color: #444444;
  font-size: 1rem;
  font-weight: 400;
  border-bottom: 1px solid #EBEBEB;
  margin: 0 auto;
  padding: 20px;
}
.calendar-container.darkmode {

  color: #F9F9F9;
  border-color: #333333; 
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  margin-bottom: 1rem;
}

.calendar-nav-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 9px;
  border: 1px solid #EFEFEF;
  border-radius: 9px;
  font-size: 1rem;
  color: #1F998E;
  transition: color 0.3s;
}
.darkmode .calendar-nav-button{
  color: #D1D1D1;
}
.calendar-nav-button:hover{
  background-color: rgba(50, 112, 224, 0.08);
  color: rgba(50, 112, 224, 1);
}
.calendar-container.dark-mode .calendar-nav-button {
  color: #ccc;
}

.dark-mode .calendar-header button{
  color: #F9F9F9;
}

.calendar-weekdays {
  display: grid;
  background-color: #F9F9F9;
  grid-template-columns: repeat(7, 1fr);
  border-radius: 71px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 300;
  color: #444444;
  margin-bottom: 0.5rem;
}
.darkmode .calendar-weekdays {
  background-color: #262626;
  color: #D1D1D1 !important;
}

.calendar-weekday {
  padding: 13px;
}

.calendar-days {
  display: grid;
  font-size: 0.8rem;
  grid-template-columns: repeat(7, 1fr); 
  grid-auto-rows: 1fr;  
  gap: 0rem; 
  row-gap: 1.5rem;
}

.calendar-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(0, 0, 0);
  border-radius: 50%;  
  cursor: pointer;
  padding: 0px;  
  width: 60%;
  aspect-ratio: 1 / 1; 
  margin: auto; 
  box-sizing: border-box; 
  transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease; 
}
.darkmode .calendar-tile{
  color: #D1D1D1;
}
.calendar-tile:hover,
.calendar-tile:focus,
.calendar-tile.selected {
  width: 60%; 
  height: auto;
  background-color: rgb(13, 165, 63, 0.1);
  border: 2px dashed #1F998E;
}
.calendar-tile.today {
  font-weight: 700;
  border: 2px dashed #1F998E;
  background-color: rgb(13, 165, 63, 0.1);

}
.calendar-container.dark-mode .calendar-tile:hover,
.calendar-container.dark-mode .calendar-tile:focus {
  background-color: #FFC14814;
}
.calendar-tile.today::before,
.calendar-tile.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: scale(0.8); 
  z-index: -1; 
}
.dark-mode .calendar-tile.today::before,
.dark-mode .calendar-tile.selected::before {
  border-color: #DEA900;
}
.calendar-tile.today::before {
  border-color: #ffeb3b;
  background-color: #fffae6;
  border-style: dotted;
}
.dark-mode .calendar-tile.today::before {
  border-color: #DEA900 !important;
  background-color: #F9F9F9 !important;
}
.calendar-tile.empty-tile {
  background-color: transparent;
  cursor: default;
  pointer-events: none;
}
@media (max-width: 1100px) {
  .calendar-container {
    max-width: 35rem;
    width: 100%;
    padding: 10px;
  }

  .calendar-header {
    font-size: 1rem;
  }

  .calendar-weekdays {
    grid-template-columns: repeat(7, 1fr);
    font-size: 0.7rem;
  }
.calendar-weekday{
  padding: 5px;
}
  .calendar-days {
    grid-template-columns: repeat(7, 1fr);
    row-gap: 0.5rem;
  }
  .calendar-tile:hover,
.calendar-tile:focus,
.calendar-tile.selected {
  width: 60%; 
  height: auto;
}

  .calendar-tile {
    width: 60%;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 600px) {
  .calendar-container {
    max-width: 100%;
    width: 100%;
    padding: 10px;
  }

  .calendar-header {
    font-size: 1rem;
  }

  .calendar-weekdays {
    grid-template-columns: repeat(7, 1fr);
    font-size: 0.7rem;
  }

  .calendar-days {
    grid-template-columns: repeat(7, 1fr);
    row-gap: 0.5rem;
  }
  .calendar-tile:hover,
.calendar-tile:focus,
.calendar-tile.selected {
  width: 80%; 
  height: auto;
}

  .calendar-tile {
    width: 80%;
    aspect-ratio: 1 / 1;
  }
}
