.hubspot-meeting-modal {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  max-height: min(900px, calc(100svh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg, 8px);
  background: var(--paper, #fbfaf6);
  color: var(--ink, #0e1b2c);
  box-shadow: 0 12px 30px rgba(14, 27, 44, 0.36);
}

.hubspot-meeting-modal::backdrop {
  background: rgba(8, 18, 31, 0.76);
}

.hubspot-meeting-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid rgba(14, 27, 44, 0.12);
  background: var(--paper, #fbfaf6);
}

.hubspot-meeting-modal__eyebrow {
  margin: 0 0 3px;
  color: var(--brass, #a8835b);
  font-family: var(--f-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.hubspot-meeting-modal__title {
  margin: 0;
  color: var(--ink, #0e1b2c);
  font-family: var(--f-sans, sans-serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.hubspot-meeting-modal__close {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(14, 27, 44, 0.22);
  border-radius: 50%;
  background: transparent;
  color: var(--ink, #0e1b2c);
  cursor: pointer;
  font: inherit;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.hubspot-meeting-modal__close:hover {
  border-color: var(--ink, #0e1b2c);
  background: var(--ink, #0e1b2c);
  color: var(--paper, #fbfaf6);
}

.hubspot-meeting-modal__close:focus-visible {
  outline: var(--focus-ring, 2px solid #a8835b);
  outline-offset: 3px;
}

.hubspot-meeting-modal__content {
  max-height: calc(min(900px, 100svh - 32px) - 80px);
  overflow: auto;
  background: #fff;
}

.hubspot-meeting-modal__scheduler {
  min-height: 615px;
}

.hubspot-meeting-modal__scheduler iframe {
  display: block;
  width: 100%;
  min-width: 312px;
  border: 0;
}

.hubspot-meeting-modal__fallback {
  margin: 0;
  padding: 16px;
  color: var(--slate, #4f5a68);
  font-size: 14px;
  line-height: 1.5;
}

.hubspot-meeting-modal__fallback a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--brass, #a8835b);
  text-underline-offset: 3px;
}

body.hubspot-meeting-modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .hubspot-meeting-modal {
    width: calc(100vw - 16px);
    height: calc(100svh - 16px);
    max-height: calc(100svh - 16px);
  }

  .hubspot-meeting-modal[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .hubspot-meeting-modal__header {
    gap: 12px;
    padding: 12px;
  }

  .hubspot-meeting-modal__title {
    font-size: 18px;
  }

  .hubspot-meeting-modal__content {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  .hubspot-meeting-modal__scheduler {
    min-height: 0;
    height: 100%;
  }

  /* Keep HubSpot's own scroll area and action buttons inside the popup.
     The embed script otherwise assigns a height taller than a phone screen. */
  .hubspot-meeting-modal__scheduler iframe {
    height: 100% !important;
    min-height: 0 !important;
  }

  .hubspot-meeting-modal__fallback {
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .hubspot-meeting-modal {
    width: calc(100vw - 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hubspot-meeting-modal,
  .hubspot-meeting-modal::backdrop {
    transition: none;
  }
}
