.tsitah-calendar-widget {
  --tsitah-calendar-dark: #11110f;
  --tsitah-calendar-ink: #24231f;
  --tsitah-calendar-paper: #f2ede3;
  --tsitah-calendar-gold: #d49a28;
  --tsitah-calendar-line: rgba(212, 154, 40, 0.36);
  margin: 0 0 clamp(34px, 5vw, 64px);
  color: var(--tsitah-calendar-ink);
  font-family: inherit;
}

.tsitah-calendar-widget.is-compact {
  display: inline-flex;
  margin: 0;
}

.tsitah-calendar-widget.is-compact .tsitah-calendar-open {
  min-height: 40px;
  padding: 0 15px;
  font-size: 0.72rem;
}

.tsitah-calendar-intro {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--tsitah-calendar-line);
  background:
    linear-gradient(115deg, rgba(212, 154, 40, 0.1), transparent 45%),
    var(--tsitah-calendar-dark);
  color: var(--tsitah-calendar-paper);
}

.tsitah-calendar-intro > div > span,
.tsitah-calendar-header span {
  display: block;
  margin-bottom: 8px;
  color: var(--tsitah-calendar-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tsitah-calendar-intro h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.tsitah-calendar-intro p {
  max-width: 650px;
  margin: 10px 0 0;
  color: rgba(242, 237, 227, 0.72);
  font-size: 1rem;
}

.tsitah-calendar-open {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 11px;
  align-items: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--tsitah-calendar-gold);
  border-radius: 0;
  background: var(--tsitah-calendar-gold);
  color: #111;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tsitah-calendar-open:hover,
.tsitah-calendar-open:focus-visible {
  background: transparent;
  color: var(--tsitah-calendar-paper);
  transform: translateY(-2px);
}

.tsitah-calendar-widget.is-compact .tsitah-calendar-open:hover,
.tsitah-calendar-widget.is-compact .tsitah-calendar-open:focus-visible {
  border-color: var(--tsitah-calendar-gold);
  background: #fff;
  color: #111;
}

.tsitah-calendar-icon {
  position: relative;
  width: 17px;
  height: 16px;
  border: 2px solid currentColor;
}

.tsitah-calendar-icon::before {
  position: absolute;
  top: 3px;
  right: 0;
  left: 0;
  border-top: 2px solid currentColor;
  content: "";
}

.tsitah-calendar-is-open {
  overflow: hidden;
}

.tsitah-calendar-modal[hidden],
.tsitah-calendar-event[hidden] {
  display: none;
}

.tsitah-calendar-modal {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  padding: 28px;
  align-items: start;
  justify-items: center;
}

.tsitah-calendar-backdrop {
  position: absolute;
  border: 0;
  background: rgba(5, 5, 4, 0.88);
  cursor: pointer;
  inset: 0;
}

.tsitah-calendar-shell {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(212, 154, 40, 0.45);
  background: var(--tsitah-calendar-paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.tsitah-calendar-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(36, 35, 31, 0.2);
}

.tsitah-calendar-header h2 {
  margin: 0;
  color: var(--tsitah-calendar-ink);
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.tsitah-calendar-close,
.tsitah-calendar-event-close {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(36, 35, 31, 0.35);
  border-radius: 50%;
  background: transparent;
  color: var(--tsitah-calendar-ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.7rem;
  line-height: 1;
  place-items: center;
}

.tsitah-calendar-close:hover,
.tsitah-calendar-close:focus-visible,
.tsitah-calendar-event-close:hover,
.tsitah-calendar-event-close:focus-visible {
  border-color: var(--tsitah-calendar-gold);
  background: var(--tsitah-calendar-gold);
}

.tsitah-calendar-controls {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 14px;
  align-items: center;
  margin: 26px 0 18px;
}

.tsitah-calendar-controls strong {
  color: var(--tsitah-calendar-ink);
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  text-align: center;
}

.tsitah-calendar-controls button {
  width: 48px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(36, 35, 31, 0.28);
  background: transparent;
  color: var(--tsitah-calendar-ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
}

.tsitah-calendar-controls button:hover,
.tsitah-calendar-controls button:focus-visible {
  border-color: var(--tsitah-calendar-ink);
  background: var(--tsitah-calendar-ink);
  color: var(--tsitah-calendar-paper);
}

.tsitah-calendar-weekdays,
.tsitah-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.tsitah-calendar-weekdays {
  border-top: 1px solid rgba(36, 35, 31, 0.2);
  border-left: 1px solid rgba(36, 35, 31, 0.2);
}

.tsitah-calendar-weekdays span {
  padding: 9px 4px;
  border-right: 1px solid rgba(36, 35, 31, 0.2);
  color: rgba(36, 35, 31, 0.62);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.tsitah-calendar-grid {
  border-top: 1px solid rgba(36, 35, 31, 0.2);
  border-left: 1px solid rgba(36, 35, 31, 0.2);
}

.tsitah-calendar-day {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: clamp(58px, 8.5vh, 72px);
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;
  border: 0;
  border-right: 1px solid rgba(36, 35, 31, 0.2);
  border-bottom: 1px solid rgba(36, 35, 31, 0.2);
  background: rgba(255, 255, 255, 0.3);
  color: var(--tsitah-calendar-ink);
  font: inherit;
  text-align: left;
}

.tsitah-calendar-day strong {
  font-size: 1rem;
}

.tsitah-calendar-day.is-empty {
  background: rgba(36, 35, 31, 0.035);
}

button.tsitah-calendar-day.is-booked {
  background: var(--tsitah-calendar-dark);
  color: var(--tsitah-calendar-paper);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

button.tsitah-calendar-day.is-booked:hover,
button.tsitah-calendar-day.is-booked:focus-visible {
  z-index: 1;
  outline: 3px solid var(--tsitah-calendar-gold);
  outline-offset: -3px;
  background: var(--tsitah-calendar-gold);
  color: #111;
}

button.tsitah-calendar-day.is-booked.is-past {
  background: #4b4a45;
}

button.tsitah-calendar-day.is-booked.is-today {
  box-shadow: inset 0 0 0 3px var(--tsitah-calendar-gold);
}

.tsitah-calendar-day small {
  display: block;
  width: 100%;
  margin-top: 10px;
  overflow: hidden;
  font-size: 0.73rem;
  font-weight: 400;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tsitah-calendar-event {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(430px, calc(100% - 40px));
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--tsitah-calendar-gold);
  background: var(--tsitah-calendar-dark);
  color: var(--tsitah-calendar-paper);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
}

.tsitah-calendar-event-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-color: rgba(242, 237, 227, 0.4);
  color: var(--tsitah-calendar-paper);
}

.tsitah-calendar-event h3 {
  max-width: calc(100% - 46px);
  margin: 0;
  color: var(--tsitah-calendar-paper);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.12;
}

.tsitah-calendar-event dl {
  margin: 24px 0 0;
}

.tsitah-calendar-event dl > div {
  padding: 14px 0;
  border-top: 1px solid rgba(212, 154, 40, 0.35);
}

.tsitah-calendar-event dt {
  margin-bottom: 3px;
  color: rgba(242, 237, 227, 0.58);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tsitah-calendar-event dd {
  margin: 0;
  color: var(--tsitah-calendar-paper);
  font-size: 1.08rem;
}

@media (max-width: 760px) {
  .tsitah-calendar-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .tsitah-calendar-open {
    width: 100%;
    justify-content: center;
  }

  .tsitah-calendar-modal {
    padding: 0;
  }

  .tsitah-calendar-shell {
    width: 100%;
    height: 100%;
    max-height: none;
    padding: 20px 14px;
    border: 0;
  }

  .tsitah-calendar-day {
    min-height: 58px;
    padding: 7px;
  }

  .tsitah-calendar-day small {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 0.56rem;
    line-height: 1.05;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
  }

  .tsitah-calendar-event {
    width: calc(100% - 28px);
  }
}

@media (max-width: 420px) {
  .tsitah-calendar-weekdays span {
    font-size: 0.58rem;
  }

  .tsitah-calendar-day {
    min-height: 52px;
    padding: 6px;
  }
}
