@charset "UTF-8";
:root {
  --dark-body: #4d4c5a;
  --dark-main: #232325;
  --dark-second: #79788c;
  --dark-hover: #323048;
  --dark-text: #ffffff;
  --light-body: #f3f8fe;
  --light-main: #fdfdfd;
  --light-second: #c3c2c8;
  --light-hover: #1a1a1c;
  --light-text: #d2a64e;
  --blue: #d2a64ea2;
  --white: #fff;
  --shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  --font-family: cursive;
}

.light {
  --bg-body: var(--dark-body);
  --bg-main: var(--dark-main);
  --bg-second: var(--light-second);
  --color-hover: var(--light-hover);
  --color-txt: var(--light-text);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.calendar {
  height: 100%;
  width: 100%;
  background-color: var(--bg-main);
  border-radius: 30px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 20px;
  padding-top: 10px;
  position: relative;
  overflow: hidden;
  border: rgba(255, 193, 7, 0.267) solid 1px;
}

.light .calendar {
  box-shadow: var(--shadow);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(16px, 6vw, 30px);
  font-weight: 550;
  color: #d2a64e;
  margin-bottom: 4%;
  flex-wrap: nowrap;
}

.calendar-body {
  padding: 10px;
}

.calendar-week-day {
  height: 50px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 3%;
  position: relative;
  /* Dodaj pozycję względną, aby kontrolować element potomny */
}

.calendar-week-day::after {
  content: "";
  position: absolute;
  bottom: 1%;
  left: 3%;
  /* Ustaw pozycję początkową obramowania */
  width: 94%;
  /* Ustaw szerokość na 80% */
  height: 1px;
  /* Wysokość obramowania */
  background-color: #d2a64e;
  /* Kolor obramowania */
}

.calendar-week-day div {
  display: grid;
  place-items: center;
  color: #d2a64e;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  color: #d2a64e;
}

.calendar-days div {
  width: 4vw;
  height: 4vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  position: relative;
  cursor: pointer;
}

@media (max-width: 991px) {
  .calendar-days div {
    width: 7vw;
    /* 15% szerokości widoku na mniejszych ekranach */
    height: 7vw;
    /* 15% szerokości widoku - można też zastosować 15vh dla wysokości widoku */
  }
}
@media (max-width: 576px) {
  .calendar-days div {
    width: 11vw;
    /* 20% szerokości widoku na mniejszych ekranach */
    height: 11vw;
    /* 20% szerokości widoku - można też zastosować 20vh dla wysokości widoku */
  }
}
.next-month-day, .prev-month-day {
  color: gray;
  font-size: 24px;
}

.calendar-days div span {
  position: absolute;
}

.calendar-days div:hover span {
  transition: width 0.2s ease-in-out, height 0.2s ease-in-out;
}

.calendar-days div span:nth-child(1),
.calendar-days div span:nth-child(3) {
  width: 2px;
  height: 0;
  background-color: var(--color-txt);
}

.calendar-days div:hover span:nth-child(1),
.calendar-days div:hover span:nth-child(3) {
  height: 100%;
}

.calendar-days div span:nth-child(1) {
  bottom: 0;
  left: 0;
}

.calendar-days div span:nth-child(3) {
  top: 0;
  right: 0;
}

.calendar-days div span:nth-child(2),
.calendar-days div span:nth-child(4) {
  width: 0;
  height: 2px;
  background-color: var(--color-txt);
}

.calendar-days div:hover span:nth-child(2),
.calendar-days div:hover span:nth-child(4) {
  width: 100%;
}

.calendar-days div span:nth-child(2) {
  top: 0;
  left: 0;
}

.calendar-days div span:nth-child(4) {
  bottom: 0;
  right: 0;
}

.calendar-days div:hover span:nth-child(2) {
  transition-delay: 0.2s;
}

.calendar-days div:hover span:nth-child(3) {
  transition-delay: 0.4s;
}

.calendar-days div:hover span:nth-child(4) {
  transition-delay: 0.6s;
}

.calendar-days div.curr-date,
.calendar-days div.curr-date:hover {
  background-color: var(--blue);
  color: var(--white);
}

.calendar-days div.curr-date span {
  display: none;
}

.month-picker {
  border-radius: 10px;
  cursor: pointer;
}

.month-change {
  height: 40px;
  width: 40px;
  border-radius: 30%;
  display: grid;
  place-items: center;
  margin: 0 0px;
  cursor: pointer;
}

.month-change:hover {
  background-color: var(--color-hover);
}

.month-picker:hover {
  background-color: var(--color-hover);
}

.year-picker {
  display: flex;
  align-items: center;
}

.year-change {
  height: 40px;
  width: 40px;
  border-radius: 30%;
  display: grid;
  place-items: center;
  margin: 0 0px;
  cursor: pointer;
}

.year-change:hover {
  background-color: var(--color-hover);
}

.calendar-footer {
  padding: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.toggle {
  display: flex;
}

.toggle span {
  margin-right: 10px;
  color: var(--color-txt);
}

.month-list {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--bg-main);
  padding: 20px;
  grid-template-columns: repeat(3, auto);
  gap: 5px;
  display: grid;
  transform: scale(1.3);
  visibility: hidden;
  pointer-events: none;
}

.month-list.show {
  transform: scale(1);
  visibility: visible;
  pointer-events: visible;
  transition: all 0.2s ease-in-out;
}

.month-list > div {
  display: grid;
  place-items: center;
}

.month-list > div > div {
  width: 100%;
  padding: 5px 20px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  color: var(--color-txt);
}

.month-list > div > div:hover {
  background-color: var(--color-hover);
}

.legend-container {
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: center;
  margin-left: 30px;
  margin-top: 30px;
  color: #d2a64e;
  font-size: large;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.legend-square {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}

.red {
  background-color: red;
}

.orange {
  background-color: orange;
}