/* Mobile portrait tip under the schedule title */
.mws-landscape-tip {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #2D435A;
  font-family: "Open Sans Hebrew", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  position: relative;
  top: -15px;
}

.mws-landscape-tip-icon {
  display: block;
  width: 19.2px;
  height: 19.2px;
  flex: 0 0 auto;
  object-fit: contain;
}

@media (max-width: 980px) and (orientation: portrait) {
  .mws-landscape-tip {
    display: inline-flex;
  }
}

@media (orientation: landscape) and (max-width: 980px) and (max-height: 600px) {
  .mws-landscape-tip {
    display: none !important;
  }
}

/* Mobile landscape: show the complete week as a compact seven-column grid. */
@media (orientation: landscape) and (max-width: 980px) and (max-height: 600px) {
  /* Hide the site header and oversized Elementor schedule heading in landscape. */
  body.page-id-1961 > header.elementor-location-header,
  body.page-id-1961 .elementor-element-59392b6,
  body.page-id-1961 .elementor-element-dcb8178 {
    display: none !important;
  }
  body.page-id-1961 .elementor-element-a15e208 {
    min-height: 0 !important;
    height: auto !important;
    align-items: stretch !important;
  }
  body.page-id-1961 .elementor-element-a15e208,
  body.page-id-1961 .elementor-element-342cef2,
  body.page-id-1961 .elementor-shortcode {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    box-sizing: border-box !important;
  }

  /* Full-width calendar, 5px side padding and 20px vertical space. */
  .mws {
    width: 100% !important;
    max-width: none !important;
    margin: 20px 0 !important;
    padding: 25px 5px 3px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  /* The compact view does not need calendar controls or day switching. */
  .mws-topbar,
  .mws-daypills,
  .mws-times,
  .mws-card-actions,
  .mws-calendar,
  .mws-cal-btn,
  .mws-cal-menu {
    display: none !important;
  }

  .mws-logo {
    display: block !important;
    top: 3px !important;
    left: 5px !important;
    width: 20px !important;
    height: 20px !important;
  }

  .mws-layout {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .mws-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
  }

  .mws-col,
  .mws-col.is-active {
    display: block !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
  }

  .mws-colhead {
    padding: 4px 1px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .mws-events {
    padding: 2px !important;
    gap: 2px !important;
  }

  .mws-card {
    display: block !important;
    height: 31px !important;
    min-height: 31px !important;
    padding: 3px 3px 8px 3px !important;
    border-radius: 5px !important;
    overflow: hidden !important;
  }

  .mws-card::after {
    display: none !important;
  }

  .mws-card-left {
    display: block !important;
    min-width: 0 !important;
    padding-left: 12px !important;
  }

  .mws-card-title {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    font-size: 7.5px !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
  }

  .mws-card-sub {
    overflow: hidden !important;
    min-height: 0 !important;
    margin-top: 1px !important;
    font-size: 6.5px !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .mws-card-time {
    left: 3px !important;
    bottom: 2px !important;
    font-size: 6.5px !important;
    line-height: 1 !important;
  }

  .mws-card-right {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    z-index: 2 !important;
    display: block !important;
    min-width: 0 !important;
  }

  .mws-icon {
    width: 10px !important;
    height: 10px !important;
    border: 0 !important;
    border-radius: 2px !important;
    font-size: 7px !important;
  }

  .mws-empty {
    padding: 4px 1px !important;
    font-size: 7px !important;
  }
}

/* Compact morning/evening separator in landscape weekly grid */
@media (orientation: landscape) and (max-width: 980px) and (max-height: 600px) {
  .mws-period-sep{
    margin: 1px 0 0 !important;
    padding: 2px 0 3px !important;
  }
  .mws-period-sep-line,
  .mws-period-sep > span{
    height: 1px !important;
    opacity: .75 !important;
  }
}

/* Fast mobile portrait transitions when switching schedule days. */
@media (max-width: 980px) and (orientation: portrait) {
  .mws-grid {
    overflow: hidden;
    perspective: 700px;
  }

  .mws-col.mws-day-animating {
    transform-origin: center top;
    will-change: transform, opacity, filter;
  }

  .mws-col.mws-day-animating.mws-enter-forward {
    animation: mws-day-enter-forward 1000ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .mws-col.mws-day-animating.mws-enter-back {
    animation: mws-day-enter-back 1000ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .mws-col.mws-day-animating .mws-card {
    animation: mws-card-enter 900ms cubic-bezier(.16, 1, .3, 1) both;
    animation-delay: var(--mws-card-delay, 0ms);
    will-change: transform, opacity;
  }

  .mws-pill.is-active {
    animation: mws-pill-pop 300ms cubic-bezier(.2, .9, .3, 1.2) both;
  }
}

@keyframes mws-day-enter-forward {
  from { opacity: 0; transform: translate3d(34px, 0, 0) scale(.99); filter: blur(1.5px); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}

@keyframes mws-day-enter-back {
  from { opacity: 0; transform: translate3d(34px, 0, 0) scale(.99); filter: blur(1.5px); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}

@keyframes mws-card-enter {
  from { opacity: 0; transform: translate3d(42px, 0, 0) scale(.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes mws-pill-pop {
  0% { transform: scale(.94); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .mws-col.mws-day-animating,
  .mws-col.mws-day-animating .mws-card,
  .mws-pill.is-active {
    animation: none !important;
  }
}
