#calendar_main_container {
  max-width: 400px;
}

.second-screen__calendar-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .5rem
}

/* =========== MONTH AND NEXT-PREVIOUS BUTTONS ==========*/
.second-screen__calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.second-screen__nav-btn {
  background: white;
  font-size: 20px;
  width: 20px;
  height: 20px;
  border-radius: 5.12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

.second-screen__nav-btn:not(:disabled)>* {
  color: var(--main-txt-clr);
}

.second-screen__nav-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  color: #6c6c89;
  background-color: white;
  border: none;
}

/* =========== CALENDAR BUTTONS ==========*/

.second-screen__days {
  display: contents
}

.second-screen__day {
  background: white;
  border: solid 1px var(--grey-txt-clr);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  text-align: center;
  color: var(--text-color);
  font-size: 15px;
  font-family: Erply Ladna;
  font-weight: 500;
  line-height: 15px;
  aspect-ratio: 1/1;
  margin: .1rem;
  cursor: pointer;
}

.second-screen__weekday {
  width: 100%;
  text-align: center;
  color: #444;
  font-size: 12px;
  font-family: Erply Ladna;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 12px;
  word-wrap: break-word
}

.second-screen__day--empty {
  background: none !important;
  border: none !important;
  padding: 0
}

.second-screen__day--selected {
  background: var(--main-green);
  border-color: var(--main-green);
}

.second-screen__day--disabled {
  background: none !important;
  border: solid 1px var(--grey-background);
  color: rgb(220, 220, 220) !important;
  cursor: not-allowed;
}

/* =========== TIME BUTTONS ==========*/
.second-screen__time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
  gap: .5rem;
  width: 360px;
}

.second-screen__time-slot {
  height: 40px;
  width: 70px;
  max-width: 70px;
  background: #fff;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .05);
  color: var(--main-txt-clr);
  font-size: 14px;
  font-family: Erply Ladna;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}

.second-screen__time-slot--selected {
  background: var(--main-green);
  color: var(--main-txt-clr);
  border: 1px solid var(--main-green);
}

.second-screen__time-slot--selected:hover {
  background: var(--main-green)
}

@media (max-width: 850px) {
  .second-screen__time-grid {
    max-width: 400px;
  }
}

@media (max-width: 4000px) {
  .second-screen__time-grid {
    max-width: auto;
    width: auto;
  }
}

@media (max-width: 480px) {
    #calendar_main_container {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    
    
    .second-screen__calendar-grid {
        gap: 0.25rem;
    }
    
    .second-screen__day {
        font-size: 12px;
    }
    
    .second-screen__weekday {
        font-size: 11px;
    }
    
    .second-screen__time-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.25rem;
    }
    
    .second-screen__time-slot {
        width: 100%;
        max-width: none;
        min-width: 60px;
    }
}

/* safari (newer) */
@media (max-width: 480px) {
    @supports (-webkit-touch-callout: none) {
        #calendar_main_container {
            max-width: 90%;
        }
    }
}