.booking-flow, .dh-bookings {
  width: min(100%, 43rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.dh-bookings .heading { margin: 0; }
.dh-bookings .booking-list { margin-top: 0; }
.dh-bookings-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tint);
}
.dh-bookings-filter button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}
.dh-bookings-filter button[aria-pressed='true'] {
  border-color: var(--line);
  color: var(--navy);
  background: var(--surface);
}
.dh-bookings-updates { min-height: 44px; }
.dh-bookings-updates-page .booking-activity-item { background: var(--surface); }
.dh-bookings-updates-page .booking-activity-item.is-unread { background: var(--tint); }
.dh-booking-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 8px;
  border-radius: 15px;
}
.dh-booking-card strong { overflow-wrap: anywhere; }
.dh-booking-card small { grid-column: 1 / -1; color: var(--muted); }

.request-tile {
  position: relative;
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.request-tile-list:hover { border-color: var(--line-strong); }
.request-tile-list:has(.request-tile-open:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.request-tile-heading { display: flex; align-items: start; justify-content: space-between; gap: 6px 8px; }
.request-tile-heading h1, .request-tile-heading h3 { min-width: 0; font: 750 clamp(1.15rem, 4vw, 1.5rem)/1.2 var(--sans); color: var(--navy); overflow-wrap: anywhere; }
.request-tile-heading .badge { flex: 0 0 auto; }
.badge.request-waiting { color: var(--urgent-text); background: var(--urgent-bg); }
.request-tile-open { color: inherit; padding: 0; border: 0; background: none; text-align: left; font: inherit; }
.request-tile-open::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.request-tile-details { display: grid; gap: 3px; margin: 9px 0 0; }
.request-tile-details > div { display: grid; grid-template-columns: minmax(6rem, 24%) minmax(0, 1fr); gap: 8px; align-items: baseline; }
.request-tile-details dt { color: var(--muted); font-size: .875rem; }
.request-tile-details dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.request-sitter-pay {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-top: 9px;
  padding: 7px 10px; border-radius: 8px; background: var(--success-bg); color: var(--green); font-size: .875rem;
}
.request-sitter-pay strong { font-size: 1rem; }
.request-sitter-pay small { color: var(--muted); }
.dh-booking-card .sitter-payout-summary { color: var(--green); }
.request-tile-note { margin-top: 10px; padding: 8px 10px; border-radius: 9px; background: var(--tint); white-space: pre-wrap; overflow-wrap: anywhere; }
.request-tile-note + .request-tile-note { margin-top: 5px; }
.booking-quick-notes { margin-top: 8px; border-top: 1px solid var(--line); }
.booking-quick-notes .booking-flow-disclosure > summary { padding-inline: 0; }
.booking-quick-notes .booking-flow-disclosure-body { padding: 0 0 4px; }
.booking-quick-notes .request-tile-note { margin: 0; }
.booking-quick-notes .request-tile-note + .request-tile-note { margin-top: 6px; }
.request-tile-actions { position: relative; margin-top: 10px; }
.request-tile-actions .actions { margin-top: 0; }
.request-tile-actions .btn { min-height: 44px; }
.request-tile-actions .actions > .primary { width: 100%; }
.request-tile-actions > .btn:not(:first-child) { margin-top: 9px; }
.request-tile-actions > form { margin-top: 0; }
.request-tile-actions .request-tile-details { margin: 0 0 8px; }
.request-tile-actions form > .booking-confirm-action { width: 100%; margin-bottom: 6px; }
.request-actions-row, .request-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 8px;
}
.btn.booking-confirm-action {
  min-height: 48px;
  padding-inline: 16px;
  background: var(--green);
  border-color: var(--green);
  color: var(--surface);
  overflow-wrap: anywhere;
}
.btn.booking-confirm-action:hover { filter: brightness(.92); }
.btn.booking-secondary {
  min-height: 44px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .85rem;
}
.btn.booking-edit-action { color: var(--urgent-text); border-color: var(--urgent-border); }
.btn.booking-edit-action:hover { background: var(--urgent-bg); }
.btn.booking-secondary.danger { border-color: var(--error-border); }
.btn.booking-secondary.danger:hover { background: var(--error-bg); }
.btn.request-text-action { border-color: transparent; background: transparent; padding-inline: 0; }
.btn.request-text-action:hover { text-decoration: underline; }
.booking-check-in-actions { display: flex; justify-content: center; }
.confirmed-booking-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.confirmed-booking-actions .booking-secondary { min-width: 84px; }
.confirmed-booking-edit { margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.booking-handoff { margin-top: 10px; }
.booking-handoff h2 { font: 750 1.08rem/1.3 var(--sans); }
.booking-handoff p { margin-block: 5px; }
.booking-handoff-button { display: flex; width: min(100%, 16rem); margin-inline: auto; }
.booking-handoff #booking-handoff-form { margin-top: 8px; }
.booking-handoff #booking-handoff-form .form-top { margin-top: 0; }
.booking-text { margin-top: 8px; }
.booking-text .message-list { max-height: 12rem; overflow: auto; }
.booking-care-options { border-top: 1px solid var(--line); }

.dh-current-care { position: relative; }
.booking-confirmation-burst {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 33px;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.booking-confirmation-burst i {
  position: absolute;
  width: 6px;
  height: 8px;
  border-radius: 2px;
  background: var(--particle, var(--green));
  animation: booking-confirmation-burst 680ms ease-out both;
}
.booking-confirmation-burst i:nth-child(1) { --x: -62px; --y: 18px; }
.booking-confirmation-burst i:nth-child(2) { --x: -44px; --y: 47px; --particle: var(--urgent-marker); }
.booking-confirmation-burst i:nth-child(3) { --x: -24px; --y: 12px; --particle: var(--blue); }
.booking-confirmation-burst i:nth-child(4) { --x: -10px; --y: 60px; }
.booking-confirmation-burst i:nth-child(5) { --x: 6px; --y: 28px; --particle: var(--urgent-marker); }
.booking-confirmation-burst i:nth-child(6) { --x: 12px; --y: 45px; --particle: var(--blue); }
.booking-confirmation-burst i:nth-child(7) { --x: 18px; --y: 8px; }
.booking-confirmation-burst i:nth-child(8) { --x: -56px; --y: 36px; --particle: var(--blue); }
@keyframes booking-confirmation-burst {
  from { opacity: 1; transform: scale(.3); }
  70% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(240deg); }
}
@media (prefers-reduced-motion: reduce) {
  .booking-confirmation-burst { display: none; }
}

.booking-care-tile .booking-flow-state {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.booking-care-tile > .inline-note { margin: 10px 0 0; }

.booking-care-tile .booking-flow-next {
  min-width: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.booking-flow-next > :first-child { margin-top: 0; }
.booking-flow-next > :last-child { margin-bottom: 0; }
.booking-flow-next .details > summary { min-height: 32px; }
.booking-care-tile .checkout-panel { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.booking-care-tile .checkout-panel h2 { font: 750 1.12rem/1.25 var(--sans); }

.booking-flow-links {
  display: grid;
  align-items: start;
}

.booking-flow-disclosure { min-width: 0; }
.booking-flow-links > .booking-flow-disclosure + .booking-flow-disclosure { border-top: 1px solid var(--line); }
.booking-flow-links > .booking-flow-disclosure > summary { padding-inline: 0; }

.booking-flow-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  color: var(--blue);
  cursor: pointer;
  font-size: .94rem;
  font-weight: 700;
  list-style: none;
}

.booking-flow-disclosure > summary::-webkit-details-marker { display: none; }

.booking-flow-disclosure > summary::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-inline-end: 4px;
  border-block-end: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  transform: rotate(45deg);
}

.booking-flow-disclosure[open] > summary::after { transform: rotate(225deg); }
.booking-flow-disclosure > summary:focus-visible { outline-offset: -3px; }
.booking-flow-disclosure-body { padding: 0 14px 14px; }
.booking-flow-disclosure-body > .facts:first-child { margin-top: 0; }

.booking-flow > .booking-flow-disclosure {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.booking-flow-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.booking-flow-tools > .btn { min-height: 44px; }
.booking-flow-archive { justify-content: end; }

@media (max-width: 600px) and (min-height: 500px) {
  [data-form="record-payment"]:not(:has([data-form-error]:not([hidden]), [name="customAmount"]:focus))
    .checkout-confirmation:not(:has([data-card-payment]:not([hidden]) [data-stripe-card])) {
    position: sticky;
    z-index: 2;
    bottom: calc(var(--dh-tab-height) + env(safe-area-inset-bottom) + 8px);
    padding: 6px 0;
    background: var(--surface);
  }
}

@media (max-width: 600px) {
  .booking-flow { gap: 10px; }
  .request-tile { padding: 12px; }

  .booking-care-tile .booking-flow-next > :is(.actions, .form-top) > .btn.primary,
  .booking-care-tile .checkout-panel [data-form='record-payment'] > .actions > .btn.primary {
    width: 100%;
    min-height: 48px;
  }
}
