html.trip-open { overflow: hidden; }
.trip-dialog {
  --trip-ink: var(--ink, #064568);
  --trip-blue: var(--blue, #004a72);
  --trip-yellow: var(--yellow, #ffd000);
  --trip-paper: var(--paper, #fffcf5);
  --trip-border: var(--line, #d5ddde);
  --trip-muted: var(--muted, #526873);
  position: fixed;
  inset: 0 0 0 auto;
  box-sizing: border-box;
  width: min(100%, 492px);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--trip-border);
  color: var(--trip-ink);
  background: var(--trip-paper);
  box-shadow: -16px 0 70px rgb(0 32 52 / 18%);
  font: inherit;
  text-align: left;
  color-scheme: light;
}
.trip-dialog[open] { display: block; }
.trip-dialog:not([open]), .trip-dialog [hidden] { display: none !important; }
.trip-dialog::backdrop { background: rgb(5 30 44 / 54%); }
.trip-dialog * { box-sizing: border-box; }
.trip-dialog :is(h2, h3, p, fieldset, legend) { margin: 0; }
.trip-dialog button, .trip-dialog input, .trip-dialog select { font: inherit; }
.trip-dialog button { cursor: pointer; }
.trip-dialog :focus-visible { outline: 3px solid #337ba8; outline-offset: 2px; }
.trip-dialog svg { width: 20px; height: 20px; flex: none; }
.trip-form { display: flex; flex-flow: column nowrap; height: 100%; margin: 0; }
.trip-head {
  flex: none;
  position: relative;
  padding: 24px 30px 23px;
  border-bottom: 3px solid var(--trip-yellow);
  background: var(--trip-blue);
  color: white;
}
.trip-head-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.trip-head-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--trip-yellow);
  color: var(--trip-ink);
  transform: rotate(-4deg);
}
.trip-head-icon svg { width: 23px; height: 23px; }
.trip-dialog .trip-close {
  appearance: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: -4px -8px -4px 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: white;
}
.trip-close:hover, .trip-close:focus-visible { background: rgb(255 255 255 / 14%); }
.trip-dialog .trip-head h2 { color: inherit; font-size: 2rem; line-height: 1.05; letter-spacing: -.035em; }
.trip-dialog .trip-head h2:focus { outline: 0; }
.trip-dialog .trip-head p { margin-top: 9px; max-width: 42ch; color: #f3f7fb; font-size: .875rem; line-height: 1.42; }
.trip-body { flex: 1; min-height: 0; padding: 23px 30px 20px; overflow-y: auto; overscroll-behavior: contain; }
.trip-section { display: grid; gap: 14px; margin: 0; padding: 0; }
.trip-section + .trip-section { margin-top: 23px; padding-top: 22px; border-top: 1px dashed var(--trip-border); }
.trip-dialog .trip-section-title { display: flex; align-items: center; gap: 9px; font-size: 1.15rem; line-height: 1.3; letter-spacing: -.025em; }
.trip-section-title svg { width: 19px; height: 19px; }
.trip-field { display: grid; gap: 6px; min-width: 0; }
.trip-field > span:first-child, .trip-allergies legend { font-size: .88rem; line-height: 1.35; font-weight: 650; }
.trip-dialog :is(.trip-field input, .trip-field select) {
  display: block;
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #a9b9bc;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: var(--trip-ink);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}
.trip-field input::placeholder { color: #667981; opacity: 1; }
.trip-select { display: block; position: relative; }
.trip-dialog .trip-field select { padding-right: 38px; cursor: pointer; }
.trip-select > svg { position: absolute; right: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; }
.trip-pair { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 12px; }
.trip-custom { display: grid; gap: 12px; background: rgb(12 81 110 / 5%); border-left: 2px solid var(--trip-blue); border-radius: 0 8px 8px 0; padding: 14px; }
.trip-custom small { color: var(--trip-muted); font-size: .78rem; line-height: 1.45; }
.trip-dialog .trip-allergies { min-width: 0; padding: 0; border: 0; }
.trip-dialog .trip-allergies legend { margin-bottom: 10px; padding: 0; }
.trip-allergen-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.trip-chip { display: inline-flex; align-items: center; position: relative; cursor: pointer; }
.trip-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.trip-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 37px;
  padding: 6px 12px;
  border: 1px solid #a9b9bc;
  border-radius: 30px;
  background: white;
  color: var(--trip-ink);
  font-size: .86rem;
  line-height: 1.15;
}
.trip-chip input:checked + span { background: var(--trip-blue); border-color: var(--trip-blue); color: white; }
.trip-chip input:checked + span::before { content: '✓'; margin-right: 5px; font-weight: 700; }
.trip-chip input:focus-visible + span { outline: 3px solid #337ba8; outline-offset: 2px; }
.trip-dialog .trip-clear {
  display: block;
  min-height: 44px;
  margin-top: 16px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--trip-blue);
  font-size: .88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.trip-notice { color: var(--trip-muted); font-size: .85rem; }
.trip-footer {
  display: flex;
  flex: none;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 15px 30px max(15px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--trip-border);
  background: var(--trip-paper);
}
.trip-dialog :is(.trip-save, .trip-cancel) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--trip-border);
  padding: 8px 17px;
  font-size: .94rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--trip-ink);
  background: white;
}
.trip-dialog .trip-save { background: var(--trip-yellow); border-color: var(--trip-yellow); }
.trip-save svg { width: 17px; height: 17px; }
.trip-dialog :is(.trip-save, .trip-cancel):hover { box-shadow: 0 1px 5px rgb(0 48 71 / 16%); filter: brightness(.98); }
@media (max-width: 520px) {
  .trip-dialog { border: 0; }
  .trip-dialog .trip-head { padding: 18px 21px; padding-top: max(18px, env(safe-area-inset-top)); }
  .trip-head-top { margin-bottom: 9px; }
  .trip-dialog .trip-head h2 { font-size: 1.72rem; }
  .trip-body { padding: 20px 21px; }
  .trip-footer { padding-left: 21px; padding-right: 21px; }
  .trip-footer .trip-save { flex: 1; }
  .trip-chip span { min-height: 42px; }
}
@media (max-height: 530px) {
  .trip-dialog .trip-head { padding: 12px 20px; }
  .trip-head-top { margin-bottom: 0; }
  .trip-head-icon { display: none; }
  .trip-dialog .trip-close { position: absolute; right: 15px; top: 8px; }
  .trip-dialog .trip-head h2 { font-size: 1.35rem; padding-right: 40px; }
  .trip-dialog .trip-head p { margin-top: 4px; max-width: 80%; font-size: .79rem; }
  .trip-footer { padding-top: 7px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
}
@media (forced-colors: active) {
  .trip-chip input:checked + span { border: 3px solid Highlight; }
}
