/* Calendar container */
.calendar {
  border-radius: 4px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  background-color: rgba(250, 250, 250, 0.25);
  height: 500px;
  perspective: 1000;
  transition: 0.9s;
  transform-style: preserve-3d;
  width: 100%;
  font-family: sans-serif !important;
}

/* Flipper and flip animation */
.flipper {
  width: 100%;
  height: 100%;
  transition: 0.9s;
  transform-style: preserve-3d;
  position: relative;
}

.calendar.flip .flipper {
  transform: rotateY(180deg);
}

/* Front & Back sides */
.front,
.back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.front {
  min-height: 100%;
  transform: rotateY(0deg);
}

.back {
  height: 100%;
  transform: rotateY(180deg);
}

/* Header */
.current-date {
  border-bottom: 1px solid rgba(73, 114, 133, 0.6);
  display: flex;
  justify-content: center;
  padding: 22px 12px;
  gap: 36px;
}

.current-date h1 {
  font-size: 1.4em;
  font-weight: 300;
  margin: 0;
  white-space: nowrap;
}

/* Weekdays */
.week-days {
  color: #dfebed;
  display: flex;
  justify-content: space-evenly;
  font-weight: 600;
  padding: 22px 0px;
  margin: 0;
  list-style: none;
}

/* Weeks and days */
.weeks {
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weeks div {
  display: flex;
  font-size: 1.2em;
  font-weight: 300;
  justify-content: space-evenly;
  margin: 0;
}

.weeks span {
  width: 30px;
  text-align: center;
  position: relative;
}

.weeks span.active {
  color: white !important;
  background: #f78536;
  border-radius: 50%;
}

.weeks span.festival {
  color: #f78536;
  font-weight: 600;
}

.weeks span.festival:after {
  content: attr(data-festival);
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: #2b4450;
  color: #fff;
  padding: 2px 5px;
  font-size: 0.8em;
  border-radius: 3px;
  white-space: nowrap;
  display: none;
}

.weeks span.festival:hover:after {
  display: block;
}

.weeks span:hover:not(.last-month) {
  cursor: pointer;
  font-weight: 600;
}

.last-month {
  opacity: 0.3;
}

/* Event dot marker */
.event {
  position: relative;
}

.event:after {
  content: "•";
  color: #f78536;
  font-size: 1.4em;
  position: absolute;
  right: -4px;
  top: -4px;
}

/* Back view content */
.back input {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(73, 114, 133, 0.6);
  font-size: 1.4em;
  font-weight: 300;
  padding: 30px 40px;
  width: 100%;
  outline: none;
}

.info {
  height: 80%;
  display: flex;
  flex-direction: column;
  font-size: 1.2em;
  padding: 22px 12px;
  justify-content: center;
  gap: 20%;
}

.info span {
  font-weight: 900;
}

.date {
  display: flex;
}

.info .address p,
.info .date p {
  width: 100%;
}

/* Actions bar */
.actions {
  bottom: 0;
  border-top: 1px solid rgba(73, 114, 133, 0.6);
  display: flex;
  justify-content: space-between;
  position: absolute;
  width: 100%;
}

.actions button {
  background: none;
  border: 0;
  color: #fff;
  font-weight: 600;
  letter-spacing: 3px;
  margin: 0;
  padding: 30px 0;
  text-transform: uppercase;
  width: 100%;
}

.actions button:hover {
  background: #497285;
  cursor: pointer;
}

.actions button:active {
  background: #5889a0;
  outline: none;
}

/* Month Selector */
.month-selector {
  gap: 12px;
  padding: 10px 0;
  background: rgba(73, 114, 133, 0.2);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.month-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.month-buttons button {
  background: none;
  border: none;
  color: #dfebed;
  font-size: 1em;
  padding: 5px 10px;
  cursor: pointer;
}

.month-buttons button.active {
  background: #f78536;
  border-radius: 4px;
}

.month-dropdown,
.year-dropdown {
  background-color: rgba(250, 250, 250, 0.25);
  display: none;
  font-size: 18px;
  padding: 10px 22px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
}

.year-dropdown {
  display: block;
}
.month-dropdown option,
.year-dropdown option {
  background-color: #ff700ea6;
}

.month-container {
  display: none;
}

.month-container.active {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .date {
    display: block;
  }

  .month-buttons {
    display: none;
  }

  .month-dropdown {
    display: block;
  }
}
