.eren-calendar,
.eren-calendar * {
  box-sizing: border-box;
}

.eren-calendar {
  --eren-green: #2f604d;
  --eren-green-soft: #eaf4ef;
  --eren-red: #a23d45;
  --eren-red-soft: #f8e9eb;
  --eren-ink: #172019;
  --eren-muted: #68736c;
  --eren-line: #dfe5e1;
  width: 100%;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--eren-line);
  border-radius: 18px;
  background: #fff;
  color: var(--eren-ink);
  box-shadow: 0 8px 30px rgba(36, 61, 50, 0.06);
  font-family: inherit;
}

.eren-calendar__topbar,
.eren-calendar__nav,
.eren-calendar__legend {
  display: flex;
  align-items: center;
}

.eren-calendar__topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eren-calendar__title {
  margin: 0;
  color: var(--eren-ink);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.2;
}

.eren-calendar__status {
  min-height: 1.25em;
  margin: 7px 0 0;
  color: var(--eren-muted);
  font-size: 13px;
}

.eren-calendar__airbnb {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 9px;
  background: var(--eren-green);
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease;
}

.eren-calendar__airbnb:hover,
.eren-calendar__airbnb:focus-visible {
  background: #244c3d;
  color: #fff !important;
  transform: translateY(-1px);
}

.eren-calendar__airbnb--mobile {
  display: none;
  margin-top: 18px;
}

.eren-calendar__nav {
  justify-content: center;
  gap: 18px;
  margin-bottom: 16px;
}

.eren-calendar__month {
  min-width: 190px;
  text-align: center;
  font-size: 19px;
}

.eren-calendar__arrow {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--eren-line);
  border-radius: 50%;
  background: #f7f9f8;
  color: var(--eren-ink);
  cursor: pointer;
  font: inherit;
  font-size: 26px;
  line-height: 36px;
}

.eren-calendar__arrow:hover:not(:disabled),
.eren-calendar__arrow:focus-visible:not(:disabled) {
  border-color: var(--eren-green);
  background: var(--eren-green-soft);
}

.eren-calendar__arrow:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.eren-calendar__grid {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--eren-line);
  border-left: 1px solid var(--eren-line);
  border-radius: 10px;
}

.eren-calendar__weekday,
.eren-calendar__day {
  border-right: 1px solid var(--eren-line);
  border-bottom: 1px solid var(--eren-line);
}

.eren-calendar__weekday {
  padding: 12px 6px;
  background: #f6f8f7;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.eren-calendar__day {
  position: relative;
  min-height: 98px;
  padding: 11px;
  background: #fff;
}

.eren-calendar__day--empty,
.eren-calendar__day--past {
  background: #fafbfa;
}

.eren-calendar__day--available {
  background: var(--eren-green-soft);
}

.eren-calendar__day--booked {
  background: var(--eren-red-soft);
}

.eren-calendar__day--today::after {
  position: absolute;
  inset: 5px;
  border: 2px solid var(--eren-green);
  border-radius: 8px;
  content: '';
  pointer-events: none;
}

.eren-calendar__number {
  display: block;
  margin-bottom: 13px;
  font-size: 16px;
  font-weight: 700;
}

.eren-calendar__badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--eren-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.eren-calendar__day--available .eren-calendar__badge {
  color: var(--eren-green);
}

.eren-calendar__day--booked .eren-calendar__badge {
  color: var(--eren-red);
}

.eren-calendar__day--past .eren-calendar__badge {
  opacity: 0.65;
}

.eren-calendar__legend {
  justify-content: flex-end;
  gap: 18px;
  margin-top: 14px;
  color: var(--eren-muted);
  font-size: 13px;
}

.eren-calendar__legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.eren-calendar__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.eren-calendar__dot--available {
  background: #77ad91;
}

.eren-calendar__dot--booked {
  background: #c9757b;
}

.eren-calendar__message {
  padding: 18px;
  border: 1px solid #ead7aa;
  border-radius: 10px;
  background: #fff8e6;
  color: #6d5521;
}

.eren-calendar [hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .eren-calendar {
    padding: 17px 12px;
    border-radius: 12px;
  }

  .eren-calendar__topbar {
    margin-bottom: 16px;
  }

  .eren-calendar__airbnb--desktop {
    display: none;
  }

  .eren-calendar__airbnb--mobile {
    display: flex;
    width: 100%;
  }

  .eren-calendar__nav {
    gap: 10px;
  }

  .eren-calendar__month {
    min-width: 155px;
    font-size: 17px;
  }

  .eren-calendar__weekday {
    padding: 9px 2px;
    font-size: 12px;
  }

  .eren-calendar__day {
    min-height: 64px;
    padding: 7px 4px;
    text-align: center;
  }

  .eren-calendar__number {
    margin-bottom: 7px;
    font-size: 14px;
  }

  .eren-calendar__badge {
    min-height: 0;
    padding: 0;
    background: transparent;
    font-size: 0;
  }

  .eren-calendar__badge::before {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #aab2ad;
    content: '';
  }

  .eren-calendar__day--available .eren-calendar__badge::before {
    background: #77ad91;
  }

  .eren-calendar__day--booked .eren-calendar__badge::before {
    background: #c9757b;
  }

  .eren-calendar__legend {
    justify-content: center;
  }
}
