/**
 * Academic calendar modal — opened from navbar.
 */

.calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.calendar-modal.is-open {
  display: flex;
}

.calendar-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 58, 117, 0.72);
  backdrop-filter: blur(3px);
}

.calendar-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 24px 60px rgba(9, 78, 157, 0.35);
}

.calendar-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.calendar-modal__title {
  margin: 0;
  color: #094e9d;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: "Nunito", "Segoe UI", Arial, sans-serif !important;
}

html[lang="en"] .calendar-modal__title,
html[dir="ltr"] .calendar-modal__title {
  font-family: "Source Sans 3", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.calendar-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #eef3f9;
  color: #094e9d;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.calendar-modal__close:hover {
  background: #094e9d;
  color: #fff;
}

.calendar-modal__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

body.calendar-modal-open {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .calendar-modal {
    padding: 0.75rem;
  }

  .calendar-modal__dialog {
    padding: 0.75rem;
    border-radius: 12px;
  }

  .calendar-modal__title {
    font-size: 1rem;
  }
}
