.pbs-widget {
  --pbs-brand: #2563eb;
  --pbs-accent: #14b8a6;
  --pbs-surface: #ffffff;
  --pbs-muted-surface: #f8fafc;
  --pbs-text: #111827;
  --pbs-button-text: #ffffff;
  --pbs-muted: #6b7280;
  --pbs-border: #e5e7eb;
  --pbs-radius: 14px;
  color: var(--pbs-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pbs-shell {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  max-width: 980px;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: var(--pbs-radius);
  background: var(--pbs-surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .16);
}

.pbs-rail {
  padding: 34px;
  color: #fff;
  background: linear-gradient(145deg, var(--pbs-brand), #172554 72%);
}

.pbs-kicker {
  display: block;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: .78;
}

.pbs-rail h2 {
  margin: 0 0 30px;
  color: #fff;
  font-size: 30px;
  line-height: 1.08;
}

.pbs-steps {
  display: grid;
  gap: 10px;
}

.pbs-steps button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  text-align: left;
}

.pbs-steps button:disabled {
  cursor: default;
  opacity: .55;
}

.pbs-steps span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 800;
}

.pbs-steps .is-active {
  border-color: rgba(255, 255, 255, .52);
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

.pbs-panel {
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, .12), transparent 28%),
    linear-gradient(180deg, #fff, var(--pbs-muted-surface));
}

.pbs-view {
  animation: pbsSlide .22s ease both;
}

@keyframes pbsSlide {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pbs-view-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.pbs-view-head span {
  color: var(--pbs-brand);
  font-size: 12px;
  font-weight: 900;
}

.pbs-view-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.16;
}

.pbs-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.pbs-choice,
.pbs-slot {
  border: 1px solid var(--pbs-border);
  border-radius: 12px;
  background: #fff;
  color: var(--pbs-text);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.pbs-choice {
  display: grid;
  min-height: 128px;
  padding: 18px;
  text-align: left;
}

.pbs-choice:hover,
.pbs-slot:hover,
.pbs-choice.is-selected,
.pbs-slot.is-selected {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--pbs-brand), white 20%);
  box-shadow: 0 14px 34px rgba(37, 99, 235, .14);
}

.pbs-choice-color {
  width: 28px;
  height: 5px;
  border-radius: 99px;
  background: var(--pbs-accent);
}

.pbs-choice strong {
  align-self: end;
  font-size: 16px;
}

.pbs-choice small {
  color: var(--pbs-muted);
}

.pbs-date-picker,
.pbs-fields label,
.pbs-settings-form label {
  display: grid;
  gap: 7px;
  color: var(--pbs-muted);
  font-size: 13px;
  font-weight: 700;
}

.pbs-calendar-bar {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.pbs-calendar-bar strong {
  text-align: center;
  text-transform: capitalize;
}

.pbs-icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--pbs-border);
  border-radius: 10px;
  background: #fff;
  color: var(--pbs-text);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.pbs-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.pbs-calendar-grid span {
  color: var(--pbs-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.pbs-calendar-grid button {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--pbs-border);
  border-radius: 10px;
  background: #fff;
  color: var(--pbs-text);
  cursor: pointer;
  font-weight: 800;
}

.pbs-calendar-grid button:hover,
.pbs-calendar-grid button.is-selected {
  border-color: var(--pbs-brand);
  color: #fff;
  background: var(--pbs-brand);
}

.pbs-calendar-grid button:disabled,
.pbs-calendar-grid .is-outside {
  opacity: .36;
}

.pbs-date-picker input,
.pbs-fields input,
.pbs-fields textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--pbs-border);
  border-radius: 10px;
  color: var(--pbs-text);
  background: #fff;
  font: inherit;
}

.pbs-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.pbs-slot {
  min-height: 48px;
  font-weight: 800;
}

.pbs-fields {
  display: grid;
  gap: 15px;
}

.pbs-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pbs-fields textarea {
  min-height: 96px;
  resize: vertical;
}

.pbs-summary {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--pbs-border);
  border-radius: 12px;
  background: #fff;
}

.pbs-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pbs-summary span,
.pbs-empty {
  color: var(--pbs-muted);
}

.pbs-payment-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.pbs-payment-choice label {
  padding: 12px 14px;
  border: 1px solid var(--pbs-border);
  border-radius: 10px;
  background: #fff;
}

.pbs-consent {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: var(--pbs-text) !important;
  font-weight: 600 !important;
}

.pbs-consent input {
  width: 18px;
  margin-top: 2px;
}

.pbs-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.pbs-primary,
.pbs-secondary {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
}

.pbs-primary {
  color: var(--pbs-button-text);
  background: linear-gradient(135deg, var(--pbs-brand), var(--pbs-accent));
  box-shadow: 0 14px 28px rgba(37, 99, 235, .23);
}

.pbs-secondary {
  color: var(--pbs-text);
  background: #eef2f7;
}

.pbs-secondary:disabled {
  cursor: default;
  opacity: .45;
}

.pbs-notice,
.pbs-loader,
.pbs-success,
.pbs-empty {
  padding: 16px;
  border-radius: 12px;
  background: #fff;
}

.pbs-notice {
  margin-bottom: 18px;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.pbs-success {
  display: grid;
  min-height: 360px;
  place-items: center;
  text-align: center;
}

.pbs-success span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #10b981;
  font-size: 34px;
}

.pbs-portal {
  display: grid;
  gap: 14px;
}

.pbs-portal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 760px) {
  .pbs-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .pbs-rail,
  .pbs-panel {
    padding: 22px;
  }

  .pbs-rail h2 {
    font-size: 24px;
  }

  .pbs-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pbs-steps button {
    justify-content: center;
    padding: 8px;
    font-size: 0;
  }

  .pbs-steps span {
    font-size: 12px;
  }

  .pbs-field-row {
    grid-template-columns: 1fr;
  }

  .pbs-calendar-grid {
    gap: 5px;
  }
}
