.phbm-modal,
.phbm-modal * {
  box-sizing: border-box;
}

.phbm-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

.phbm-modal.is-open {
  display: block;
}

.phbm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 23, 21, 0.72);
  backdrop-filter: blur(4px);
}

.phbm-dialog {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f7f5f0;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.phbm-dialog-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px 22px;
  border-bottom: 1px solid rgba(41, 40, 36, 0.14);
  background: rgba(247, 245, 240, 0.97);
  backdrop-filter: blur(8px);
}

.phbm-dialog-head h2 {
  margin: 0;
  color: #292824;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
}

.phbm-kicker {
  margin: 0 0 7px;
  color: #95703a;
  font: 700 .72rem/1.3 Poppins, Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.phbm-subtitle {
  margin: 10px 0 0;
  color: #6d6962;
  font: 400 .96rem/1.5 Poppins, Arial, sans-serif;
}

.phbm-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(41, 40, 36, 0.18);
  border-radius: 50%;
  background: #fff;
  color: #292824;
  cursor: pointer;
  font: 300 30px/40px Arial, sans-serif;
  text-align: center;
}

.phbm-close:hover,
.phbm-close:focus-visible {
  border-color: #b58a43;
  outline: none;
}

.phbm-calendar-wrap {
  padding: 24px 28px 32px;
}

body.phbm-lock {
  overflow: hidden !important;
}

/* The modal already supplies its own title, so avoid a duplicate calendar heading. */
.phbm-modal .phhc-topbar .phhc-kicker,
.phbm-modal .phhc-topbar .phhc-title {
  display: none;
}

@media (max-width: 680px) {
  .phbm-dialog {
    width: calc(100% - 14px);
    max-height: calc(100vh - 14px);
    margin: 7px auto;
  }

  .phbm-dialog-head {
    padding: 20px 18px 16px;
  }

  .phbm-subtitle {
    display: none;
  }

  .phbm-calendar-wrap {
    padding: 14px 10px 22px;
  }
}
