body.szami-event-modal-open {
  overflow: hidden;
}

.mod_events_td_daywithevents {
  cursor: pointer;
}

#szami-event-tooltip {
  position: fixed;
  z-index: 10050;
  max-width: min(300px, calc(100vw - 24px));
  padding: 10px 14px;
  color: #ffeced;
  background: #602630;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(65, 20, 29, .22);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

#szami-event-tooltip[hidden],
.szami-event-modal[hidden] {
  display: none !important;
}

.szami-event-tooltip__title + .szami-event-tooltip__title {
  margin-top: 7px;
  padding-top: 7px;

#szami-event-tooltip:not([hidden]) { display: block !important; }
  border-top: 1px solid rgba(255, 236, 237, .35);
}

.szami-event-modal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.szami-event-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(52, 18, 25, .58);
  backdrop-filter: blur(2px);
}

.szami-event-modal__card {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: min(82vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 38px 42px;
  color: #602630;
  background: #ffeced;
  border: 1px solid rgba(96, 38, 48, .22);
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(65, 20, 29, .3);
}

.szami-event-modal__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: -20px -22px 0 18px;
  padding: 0;
  color: #ffeced;
  background: #602630;
  border: 0;
  border-radius: 50%;
  font: 700 30px/40px Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(65, 20, 29, .22);
}

.szami-event-modal__close:hover,
.szami-event-modal__close:focus {
  color: #fff;
  background: #7b3341;
  outline: 3px solid rgba(96, 38, 48, .2);
}

.szami-event-modal__content {
  clear: both;
}

.szami-event-card__title {
  margin: 0 54px 24px 0;
  color: #602630;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.szami-event-card__meta,
.szami-event-card__description {
  margin-top: 18px;
  color: #4a3035;
  font-size: 17px;
  line-height: 1.65;
}

.szami-event-card__meta strong,
.szami-event-card__description > strong {
  display: block;
  margin-bottom: 3px;
  color: #602630;
  font-size: 16px;
  letter-spacing: .02em;
}

.szami-event-card__description-text,
.szami-event-card__description-text p:last-child {
  margin-bottom: 0;
}

.szami-event-card--separated {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid rgba(96, 38, 48, .18);
}

.szami-event-modal__loading,
.szami-event-modal__error {
  padding: 28px 10px;
  color: #602630;
  font-size: 17px;
  text-align: center;
}

@media (max-width: 767px) {
  .szami-event-modal {
    align-items: flex-start;
    padding: 16px;
  }

  .szami-event-modal__card {
    width: 100%;
    max-height: calc(100dvh - 32px);
    padding: 28px 22px;
    border-radius: 18px;
  }

  .szami-event-modal__close {
    width: 40px;
    height: 40px;
    margin: -14px -10px 0 12px;
    line-height: 38px;
  }

  .szami-event-card__title {
    margin-right: 44px;
    margin-bottom: 20px;
    font-size: 26px;
  }

  .szami-event-card__meta,
  .szami-event-card__description {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  #szami-event-tooltip {
    display: none !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .szami-event-modal__card {
    animation: szami-event-modal-in .18s ease-out;
  }
}

@keyframes szami-event-modal-in {
  from {opacity: 0; transform: translateY(12px) scale(.985);}
  to {opacity: 1; transform: translateY(0) scale(1);}
}
