.ibp {
  --ibp-ink: #102a43;
  --ibp-muted: #486581;
  --ibp-primary: #005b96;
  --ibp-primary-hover: #003f6b;
  --ibp-primary-soft: #e6f4fb;
  --ibp-accent: #147a4b;
  --ibp-accent-hover: #0e5a37;
  --ibp-accent-soft: #eaf7ef;
  --ibp-border: #829ab1;
  --ibp-focus: #0077b6;
  max-width: 760px;
  margin: 2rem auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  color: var(--ibp-ink);
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(16, 42, 67, 0.08);
}
.ibp__intro {
  margin-bottom: 2rem;
}
.ibp__eyebrow {
  margin: 0 0 0.4rem;
  color: var(--ibp-primary);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.ibp h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 5vw, 2.45rem);
  line-height: 1.15;
}
.ibp__progress {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 2rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.ibp__progress span {
  color: var(--ibp-muted);
}
.ibp__progress .is-active {
  color: var(--ibp-primary);
  font-weight: 700;
}
.ibp__step {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.ibp legend {
  margin-bottom: 1.2rem;
  font-size: 1.18rem;
  font-weight: 700;
}
.ibp label,
.ibp__calendar-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

/* Scoped explicitly so global WordPress theme styles do not leak into the pilot. */
.ibp .ibp__form input:not([type='hidden']),
.ibp .ibp__form select,
.ibp .ibp__calendar-trigger,
.ibp .ibp__calendar-nav,
.ibp .ibp__calendar-day {
  box-sizing: border-box;
  color: var(--ibp-ink) !important;
  background: #fff !important;
  border: 1px solid var(--ibp-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font: inherit !important;
  line-height: 1.25;
}
.ibp .ibp__form input:not([type='hidden']),
.ibp .ibp__form select {
  width: 100%;
  min-height: 52px;
  margin: 0 0 1.1rem;
  padding: 0.65rem 0.8rem;
}
.ibp .ibp__form input:focus,
.ibp .ibp__form select:focus,
.ibp .ibp__form button:focus-visible {
  border-color: var(--ibp-primary) !important;
  outline: 3px solid var(--ibp-focus) !important;
  outline-offset: 2px;
}
.ibp .ibp__form input:disabled,
.ibp .ibp__form select:disabled {
  color: #627d98 !important;
  background: #f0f4f8 !important;
  border-color: #bcccdc !important;
  cursor: not-allowed;
}
.ibp__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.ibp__grid p {
  margin: 0;
}
.ibp__professional-preference {
  margin: 0 0 1.1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--ibp-border);
  border-radius: 10px;
}
.ibp__professional-preference legend {
  margin-bottom: 0.65rem;
  font-size: 1rem;
}
.ibp__professional-preference label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.45rem 0;
  font-weight: 400;
}
.ibp .ibp__professional-preference input {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 18px;
}

.ibp .ibp__button,
.ibp .ibp__slot {
  min-height: 48px;
  padding: 0.65rem 1rem;
  color: #fff !important;
  background: var(--ibp-primary) !important;
  border: 1px solid var(--ibp-primary) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  cursor: pointer;
  font: inherit !important;
  font-weight: 700 !important;
  line-height: 1.25;
  text-decoration: none !important;
}
.ibp .ibp__button:hover:not([disabled]),
.ibp .ibp__button:active:not([disabled]) {
  background: var(--ibp-primary-hover) !important;
  border-color: var(--ibp-primary-hover) !important;
}
.ibp .ibp__button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}
.ibp .ibp__button--secondary {
  color: var(--ibp-primary) !important;
  background: #fff !important;
  border-color: var(--ibp-primary) !important;
}
.ibp .ibp__button--secondary:hover:not([disabled]),
.ibp .ibp__button--secondary:active:not([disabled]) {
  color: #fff !important;
  background: var(--ibp-primary) !important;
  border-color: var(--ibp-primary) !important;
}
.ibp__actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.ibp__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-height: 48px;
  margin: 0.5rem 0 1rem;
}
.ibp__modality {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
}
.ibp__modality legend {
  margin-bottom: 0.6rem;
}
.ibp__modality [data-modality-options] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.ibp .ibp__modality-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--ibp-border);
  border-radius: 10px;
  cursor: pointer;
}
.ibp .ibp__form .ibp__modality-option input[type='radio'] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
}
.ibp__summary {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--ibp-primary-soft);
  border-radius: 10px;
}
.ibp__summary h2 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}
.ibp__summary dl {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}
.ibp__summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.ibp__summary dt {
  color: var(--ibp-muted);
}
.ibp__summary dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.ibp .ibp__slot {
  color: var(--ibp-primary) !important;
  background: var(--ibp-primary-soft) !important;
  border-color: var(--ibp-primary) !important;
}
.ibp .ibp__slot:hover,
.ibp .ibp__slot.is-selected {
  color: #fff !important;
  background: var(--ibp-accent) !important;
  border-color: var(--ibp-accent) !important;
}
.ibp__message {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: var(--ibp-accent-soft);
  border-left: 4px solid var(--ibp-accent);
  border-radius: 4px;
}
.ibp__message.is-error {
  color: #7f1d1d;
  background: #fef2f2;
  border-color: #b91c1c;
}
.ibp__help {
  margin: -0.55rem 0 1rem;
  color: var(--ibp-muted);
  font-size: 0.9rem;
}
.ibp__honeypot {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.ibp__consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
}
.ibp .ibp__consent input {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0.15rem 0 0 !important;
  padding: 0 !important;
  flex: 0 0 18px;
}
.ibp__success {
  padding: 1rem;
  color: #0e5a37;
  background: var(--ibp-accent-soft);
  border-radius: 8px;
  font-weight: 600;
}

.ibp__calendar {
  position: relative;
  margin-bottom: 1.1rem;
}
.ibp .ibp__calendar-trigger {
  display: flex;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  text-align: left;
  align-items: center;
  justify-content: space-between;
}
.ibp .ibp__calendar-trigger::after {
  content: '▾';
  color: var(--ibp-primary);
  font-size: 1.1rem;
}
.ibp__calendar-popover {
  position: absolute;
  z-index: 20;
  width: min(100%, 360px);
  margin-top: 0.45rem;
  padding: 0.9rem;
  background: #fff;
  border: 1px solid var(--ibp-border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.18);
}
.ibp__calendar-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.7rem;
}
.ibp .ibp__calendar-nav {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  cursor: pointer;
  font-size: 1.5rem !important;
}
.ibp .ibp__calendar-nav:hover:not([disabled]) {
  color: #fff !important;
  background: var(--ibp-primary) !important;
}
.ibp .ibp__calendar-nav[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}
.ibp__calendar-month {
  margin: 0;
  color: var(--ibp-ink);
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
}
.ibp__calendar-weekdays,
.ibp__calendar-grid [role='row'] {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
}
.ibp__calendar-weekdays {
  margin-bottom: 0.25rem;
  color: var(--ibp-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}
.ibp__calendar-grid {
  display: grid;
  gap: 0.25rem;
}
.ibp .ibp__calendar-day {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0.25rem;
  cursor: pointer;
  text-align: center;
}
.ibp .ibp__calendar-day:hover:not([disabled]),
.ibp .ibp__calendar-day[aria-selected='true'] {
  color: #fff !important;
  background: var(--ibp-primary) !important;
  border-color: var(--ibp-primary) !important;
}
.ibp .ibp__calendar-day[disabled] {
  color: #9fb3c8 !important;
  background: #f0f4f8 !important;
  border-color: #d9e2ec !important;
  cursor: not-allowed;
  text-decoration: line-through;
}
.ibp__calendar-empty {
  min-height: 40px;
}

@media (max-width: 560px) {
  .ibp {
    margin: 1rem 0;
    border-radius: 12px;
  }
  .ibp__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ibp__actions {
    flex-direction: column-reverse;
  }
  .ibp .ibp__button {
    width: 100%;
  }
  .ibp__calendar-popover {
    width: 100%;
  }
}
