/* ============================================================
   Branch appointment booking — screen layout
   ============================================================ */
/* ── APP SHELL ── */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--uob-white);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--uob-primary);
  border-bottom: none;
}
.app-header .btn-ghost {
  color: var(--uob-white);
}
.app-header .btn-ghost:hover:not(:disabled) {
  color: var(--uob-white);
  background: var(--rsvp-header-ghost-hover);
}
.app-header .btn-ghost:focus-visible {
  outline-color: var(--uob-white);
}
.app-header__inner {
  max-width: var(--rsvp-content-width);
  margin: 0 auto;
  padding: 14px var(--rsvp-page-pad-x);
  display: flex;
  align-items: center;
  gap: 16px;
}
.app-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.app-brand__logo {
  display: block;
  height: 28px;
  width: auto;
}
.app-header__spacer {
  flex: 1;
}
.app-header__filter {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-header__filter-label {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  font-weight: var(--uob-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-main {
  flex: 1;
  width: 100%;
  background: var(--uob-white);
}
.app-main__inner {
  max-width: var(--rsvp-content-width);
  margin: 0 auto;
  padding: 28px var(--rsvp-page-pad-x) 96px;
  display: flex;
  flex-direction: column;
  gap: var(--rsvp-section-gap);
}

/* ── STEP VIEW ── */
.step-view {
  display: none;
  flex-direction: column;
  gap: var(--rsvp-section-gap);
}
.step-view.is-active {
  display: flex;
}

.step-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}
.step-title {
  font-family: var(--uob-font-bold);
  font-size: 32px;
  font-weight: var(--uob-fw-bold);
  line-height: var(--uob-h2-lh);
  color: var(--uob-primary);
}
/* Programmatic focus uses :focus without :focus-visible in supporting browsers;
   suppress the default ring on load/step focus while keeping keyboard indication. */
.step-title:focus {
  outline: none;
}
.step-title:focus-visible {
  outline: 2px solid var(--uob-accent-blue);
  outline-offset: 3px;
}
.step-lede {
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
  max-width: 56ch;
  text-align: center;
}
@media (min-width: 992px) {
  .step-lede {
    font-size: var(--uob-font-base);
  }
}

.step-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-section__title {
  display: flex;
  font-family: var(--font-primary);
  font-size: var(--uob-h3-size);
  font-weight: var(--uob-h3-weight);
  color: var(--uob-primary);
  text-align: center;
}
#branch-section-title {
  font-size: var(--uob-h3-size);
  font-weight: var(--uob-h3-weight);
  text-align: left;
}

/* ── STEP NAV (back / primary action) ── */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}
.step-nav__group {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── SCREEN 1: BRANCH PICKER ── */
.branch-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  row-gap: 4px;
}
/* Hoist label/field into the row grid so the button can stretch to the trigger height */
.branch-search-row > .dd-wrap {
  display: contents;
}
.branch-search-row .dd-label {
  grid-column: 1 / -1;
}
#branch-dd-label {
  font-size: var(--uob-h5-size);
  font-weight: var(--uob-h5-weight);
}
.branch-search-row .dd-field {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  min-width: 0;
}
.branch-search-row .dd-trigger,
.service-dd-stack .dd-trigger {
  flex: 1;
  width: 100%;
  border-color: var(--uob-primary);
}
/* Match the service-tab height (49px) for the branch search controls. */
.branch-search-row .dd-trigger {
  min-height: 49px;
}
.branch-search-row .dd-trigger:hover,
.service-dd-stack .dd-trigger:hover {
  border-color: var(--uob-primary-dark);
}
.branch-search-row .dd-trigger .dd-search-icon,
.service-dd-stack .dd-trigger .dd-search-icon,
.branch-search-row .dd-trigger .dd-chevron,
.service-dd-stack .dd-trigger .dd-chevron {
  color: var(--uob-primary);
}
.branch-search-row .service-add-second {
  grid-column: 2;
  grid-row: 3;
  width: auto;
  min-height: 49px;
  white-space: nowrap;
  background: var(--uob-grey-10);
  border: 1px solid var(--uob-primary);
  color: var(--uob-primary);
}
.branch-search-row .service-add-second:hover {
  background: var(--uob-hover-blue);
  border-color: var(--uob-hover-blue);
  color: var(--uob-white);
}
.branch-search-row .service-add-second .service-add-second-icon {
  color: inherit;
}
/* Asterisk legend above the branch dropdown (explains the " *" on pilot rows). */
.branch-search-row .branch-dd-helper {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  line-height: 1.35;
}

/* Dropdown with search */
.dd-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.dd-field {
  position: relative;
  width: 100%;
}
.dd-label {
  font-size: var(--uob-font-sm);
  font-weight: var(--uob-fw-bold);
  color: var(--uob-black);
}
.dd-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  min-height: 40px;
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  cursor: pointer;
  transition:
    border-color var(--uob-motion-fast),
    min-height var(--uob-motion-fast);
  font-family: inherit;
  font-size: var(--uob-font-sm);
  outline: none;
  user-select: none;
}
.dd-trigger:hover {
  border-color: var(--uob-black);
}
.dd-trigger:focus {
  border-color: var(--uob-accent-blue);
}
.dd-trigger.is-open {
  border-color: var(--uob-accent-blue);
}
.dd-trigger.is-error {
  border-color: var(--uob-red);
}
/* Branch is pinned to UOB Main while the foreign-shareholder path is active. */
.dd-trigger.is-locked {
  cursor: not-allowed;
  background: var(--uob-grey-10);
  border-color: var(--uob-grey-20);
  color: var(--uob-grey-40);
}
.dd-trigger.is-locked:hover {
  border-color: var(--uob-grey-20);
}
/* Filled service trigger grows so the segment label can sit above the service name. */
.dd-trigger.is-filled {
  min-height: 56px;
  padding-top: 8px;
  padding-bottom: 8px;
}
/* Hide the leading search/magnifier icon once a service is selected — the
   trigger is no longer behaving as a search field at that point. */
.dd-trigger.is-filled .dd-search-icon-wrap {
  display: none;
}

.dd-search-icon-wrap {
  width: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.dd-search-icon {
  flex-shrink: 0;
  display: block;
  color: var(--uob-grey-40);
}

.dd-value {
  flex: 1;
  font-size: var(--uob-font-sm);
  font-weight: var(--uob-fw-regular);
  color: var(--uob-grey-30);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dd-value.is-filled {
  font-size: var(--uob-font-base);
  color: var(--uob-black);
  font-weight: var(--uob-fw-bold);
}
/* Stacked value: segment label sits above the service name. */
.dd-value--stacked {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  white-space: normal;
  line-height: 1.25;
}
.dd-value__seg {
  font-size: var(--uob-font-xs);
  font-weight: var(--uob-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--uob-grey-40);
  line-height: 1.2;
}
.dd-value__label {
  font-size: var(--uob-font-base);
  font-weight: var(--uob-fw-bold);
  color: var(--uob-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-search-input {
  flex: 1;
  font-family: inherit;
  font-size: var(--uob-font-sm);
  font-weight: var(--uob-fw-regular);
  color: var(--uob-black);
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  min-width: 0;
}
.dd-search-input::placeholder {
  color: var(--uob-grey-30);
}
#branch-search {
  font-weight: var(--uob-fw-bold);
}

.dd-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--uob-grey-40);
  transition: transform var(--uob-motion-base);
  display: block;
}
.dd-chevron.is-up {
  transform: rotate(180deg);
}

.dd-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-md);
  box-shadow: var(--uob-shadow-2);
  z-index: 20;
  display: none;
  overflow: hidden;
  /* JS sets --dd-panel-max/min-height to fill the viewport below the trigger. */
  min-height: var(--dd-panel-min-height, 0px);
  max-height: var(--dd-panel-max-height, min(85dvh, 640px));
  overflow-y: auto;
}
.dd-panel.is-visible {
  display: block;
}
/* Breathing room at the foot of the branch list so the last row isn't flush
   against the scroll edge and read as truncated. */
#branch-panel {
  padding-bottom: 20px;
}

.dd-option {
  padding: 10px 16px;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  cursor: pointer;
  transition: background var(--uob-motion-fast);
}
/* Light divider between consecutive option rows in the panel. */
.dd-option + .dd-option {
  border-top: 1px solid var(--uob-grey-20);
}
.dd-option:hover,
.dd-option.is-highlighted {
  background: var(--uob-grey-10);
}
.dd-option.is-selected {
  background: var(--uob-blue-soft);
  color: var(--uob-primary);
}

/* Branch-specific option layout */
.dd-option--branch {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.dd-option__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dd-option__name {
  font-family: var(--font-primary-bold);
  font-size: var(--uob-h6-size);
  line-height: var(--uob-h6-lh);
  font-weight: var(--uob-h6-weight);
  color: var(--uob-black);
}
.dd-option__addr {
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
  white-space: normal;
}
/* Branch rows use solid blue fills: selected = darker, hover = brighter. */
.dd-option--branch.is-selected {
  background: var(--primary);
  color: var(--white);
}
.dd-option--branch:hover,
.dd-option--branch.is-highlighted {
  background: var(--primary-light);
  color: var(--white);
}
.dd-option--branch.is-selected .dd-option__name,
.dd-option--branch.is-selected .dd-option__addr,
.dd-option--branch:hover .dd-option__name,
.dd-option--branch:hover .dd-option__addr,
.dd-option--branch.is-highlighted .dd-option__name,
.dd-option--branch.is-highlighted .dd-option__addr {
  color: inherit;
}
.dd-option__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.dd-option__dist {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
}

.dd-no-results {
  padding: 12px 16px;
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
  font-style: italic;
}

/* Sticky group label inside a long, scrollable dropdown panel. */
.dd-group-label {
  position: sticky;
  top: 0;
  padding: 8px 16px;
  font-size: var(--uob-font-sm);
  font-weight: var(--uob-fw-bold);
  color: var(--uob-white);
  letter-spacing: 0;
  background: var(--uob-primary);
  z-index: 1;
}

/* Service option layout — title and description stack tightly in column 1;
   the optional tag occupies column 2 and spans both rows so it never
   stretches the title row's height. Mirrors the branch variant. */
.dd-option--service {
  padding: 12px 16px;
}
.dd-option--service .dd-option__main {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 8px;
  row-gap: 2px;
}
.dd-option--service .dd-option__name {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-primary-bold);
  font-size: var(--uob-h6-size);
  font-weight: var(--uob-h6-weight);
  color: var(--uob-black);
  line-height: 1.3;
}
.dd-option--service .dd-option__addr {
  grid-column: 1;
  grid-row: 2;
  font-size: var(--uob-font-sm);
  line-height: 1.4;
  color: var(--uob-grey-40);
}
/* Tag occupies column 2, spans both rows, aligned to the title's baseline. */
.dd-option--service > .dd-option__main > .tag {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  flex-shrink: 0;
}
/* "Service available online" — 4px corners (not pill); scoped so it wins over .tag */
.dd-option--service .tag.tag--success {
  border-radius: 4px;
}
.dd-option--service.is-selected .dd-option__name,
.dd-option--service.is-selected .dd-option__addr {
  color: inherit;
}

/* Desktop: split the service panel into two columns —
   Personal in column 1, Business in column 2. Scoped via :has() so it only
   applies to the service panels (which always emit .dd-group-label rows);
   the branch panel has no group labels and stays single-column.
   We can't use :nth-of-type to find "the 2nd .dd-group-label" because
   :nth-of-type counts by tag name and all children are <div>s. Instead we
   identify the 2nd label as ".dd-group-label preceded by another
   .dd-group-label sibling" and items after it as siblings of that pair. */
@media (min-width: 641px) {
  /* Scoped to .is-visible so the desktop grid only takes effect when the
     panel is actually open. Without .is-visible the base ".dd-panel {
     display: none }" rule wins, keeping the panel hidden after selection
     even though it still has .dd-group-label children in the DOM. */
  .dd-panel.is-visible:has(> .dd-group-label) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row dense;
    align-content: start;
    /* In 2-column mode each column has roughly half the rows, so the panel's
       natural content height is much smaller than in single-column mode. JS
       sets inline min/max-height to "viewport below trigger" to fill space
       in single-column; that same value clips items in 2-column. Release
       both so the panel sizes to content. If content still exceeds the
       viewport, syncDropdownScrollPad adds page bottom-padding so the user
       can scroll the page to reveal the rest of the panel. */
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible;
  }
  .dd-panel.is-visible:has(> .dd-group-label) > * {
    grid-column: 1;
    min-width: 0;
  }
  .dd-panel.is-visible:has(> .dd-group-label)
    > .dd-group-label
    ~ .dd-group-label,
  .dd-panel.is-visible:has(> .dd-group-label)
    > .dd-group-label
    ~ .dd-group-label
    ~ * {
    grid-column: 2;
  }
  .dd-panel.is-visible:has(> .dd-group-label)
    > .dd-group-label
    ~ .dd-group-label,
  .dd-panel.is-visible:has(> .dd-group-label)
    > .dd-group-label
    ~ .dd-group-label
    ~ .dd-option {
    border-left: 1px solid var(--uob-grey-20);
  }
}

/* Hint shown next to the dd-label (e.g. "Required" / "Optional"). */
.dd-label__hint {
  margin-left: 8px;
  font-size: var(--uob-font-xs);
  font-weight: var(--uob-fw-regular);
  color: var(--uob-grey-40);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* External clear button beside a filled service dropdown — pairs with branch-style trigger. */
.service-row .dd-clear.btn {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  height: auto;
  min-height: 40px;
  width: 40px;
  padding: 0;
  flex-shrink: 0;
  background: var(--uob-white);
  border: 1px solid var(--uob-primary);
  color: var(--uob-primary);
}
.service-row .dd-clear.btn:hover:not(:disabled) {
  background: var(--uob-white);
  border-color: var(--uob-primary-dark);
  color: var(--uob-primary-dark);
}
.service-row .dd-clear.btn:active:not(:disabled) {
  background: var(--uob-grey-10);
  border-color: var(--uob-primary-dark);
  color: var(--uob-primary-dark);
}
.service-row .dd-clear.btn:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
  border-color: var(--uob-accent-blue);
}

/* Stack the two service dropdowns vertically with breathing room. */
.service-dd-stack {
  gap: 16px;
}

/* Row layout used when a service slot is filled — places the dd-wrap and the
   external clear button side-by-side, mirroring .branch-search-row so the
   button stretches to match the trigger height (40px collapsed, 56px filled). */
.service-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  row-gap: 4px;
  align-items: end;
  width: 100%;
}
.service-row > .dd-wrap {
  display: contents;
}
.service-row .dd-label {
  grid-column: 1 / -1;
}
.service-row .dd-field {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  min-width: 0;
}

.service-add-second {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 16px;
  min-height: 40px;
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  font-family: inherit;
  font-size: var(--uob-font-sm);
  font-weight: var(--uob-fw-medium);
  color: var(--uob-primary);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  outline: none;
  transition:
    border-color var(--uob-motion-fast),
    color var(--uob-motion-fast);
}
.service-add-second-icon {
  flex-shrink: 0;
  display: block;
  color: var(--uob-primary);
}
.service-add-second:hover {
  color: var(--uob-primary-dark);
  border-color: var(--uob-primary-dark);
}
.service-dd-stack > .service-add-second {
  border-color: var(--uob-primary);
}
.service-dd-stack > .service-add-second:hover {
  border-color: var(--uob-primary-dark);
}
.service-add-second:focus {
  border-color: var(--uob-accent-blue);
}
.service-add-second:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
}

/* ── SCREEN 1: SERVICE TABS (segment picker, replaces service dropdowns) ── */
.service-tab-section {
  gap: 0;
  border: none;
  border-radius: var(--uob-radius-md);
  overflow: hidden;
  background: var(--uob-white);
}
.svc-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  background: var(--uob-grey-10);
  border-radius: var(--uob-radius-md);
}
.svc-tab {
  appearance: none;
  border: none;
  background: var(--uob-grey-10);
  color: var(--uob-grey-40);
  font-family: var(--font-primary-bold);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--uob-radius-sm);
  cursor: pointer;
  text-align: center;
  transition:
    background var(--uob-motion-fast),
    color var(--uob-motion-fast);
}
.svc-tab.is-active {
  background: var(--uob-primary);
  color: var(--uob-white);
}
.svc-tab:not(.is-active):hover {
  background: transparent;
  color: var(--uob-primary);
}
.svc-tab:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
}

.svc-tab-panel {
  display: grid;
  grid-template-columns: 1fr;
  /* Rows size to their content (cards keep their own min-height). Using 1fr
     here equalised every row to the tallest, so the tall shareholder panel
     stretched the whole list. */
  grid-auto-rows: min-content;
  gap: 4px;
  padding: 8px 5px;
}

/* Category heading inside the service panel (Accounts-Related, Other
   Services, etc.). Spans the grid so it sits flush-left above its cards. */
.svc-group-label {
  grid-column: 1 / -1;
  margin: 6px 0 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--uob-grey-20);
  font-family: var(--font-primary-bold);
  font-size: var(--uob-h6-size);
  font-weight: var(--uob-h6-weight);
  color: var(--uob-grey-40);
}
.svc-group-label:first-child {
  margin-top: 0;
}

.svc-card {
  appearance: none;
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  min-height: 48px;
  padding: 6px 12px;
  background: var(--uob-white);
  border: none;
  border-radius: var(--uob-radius-md);
  cursor: pointer;
  color: var(--uob-black);
  font-family: inherit;
  font-size: var(--uob-font-base);
  transition:
    background var(--uob-motion-fast),
    border-color var(--uob-motion-fast),
    color var(--uob-motion-fast);
}
.svc-card:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
}

.svc-card__check {
  width: 20px;
  height: 20px;
  border-radius: var(--uob-radius-full);
  border: 2px solid var(--uob-primary);
  background: transparent;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  transition:
    background var(--uob-motion-fast),
    border-color var(--uob-motion-fast),
    color var(--uob-motion-fast);
}
.svc-card__check svg {
  display: block;
}

.svc-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.svc-card__label {
  font-family: var(--font-primary-bold);
  font-size: var(--uob-font-base);
  font-weight: var(--uob-fw-bold);
  line-height: 1.3;
  color: var(--primary);
}
.svc-card__desc {
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
  line-height: 1.4;
}

/* Hover only on desktop (and only when not selected and not disabled) */
@media (min-width: 641px) {
  .svc-card:hover:not(:disabled):not(.is-selected) {
    background: var(--uob-hover-blue);
    border-color: var(--uob-hover-blue);
    color: var(--uob-white);
  }
  .svc-card:hover:not(:disabled):not(.is-selected) .svc-card__desc,
  .svc-card:hover:not(:disabled):not(.is-selected) .svc-card__label {
    color: var(--uob-white);
  }
  .svc-card:hover:not(:disabled):not(.is-selected) .svc-card__check {
    border-color: var(--uob-white);
  }
  .svc-card.is-selected:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--primary-light);
  }
  .svc-card.is-selected:hover:not(:disabled) .svc-card__check {
    color: var(--primary-light);
  }
}

/* Selected — persistent UOB blue background + filled white tick circle */
.svc-card.is-selected {
  background: var(--uob-primary);
  border-color: var(--uob-primary);
  color: var(--uob-white);
}
.svc-card.is-selected .svc-card__desc,
.svc-card.is-selected .svc-card__label {
  color: var(--uob-white);
}
.svc-card.is-selected .svc-card__check {
  background: var(--uob-white);
  border-color: var(--uob-white);
  color: var(--uob-primary);
}

/* Disabled (max basket reached, this card not selected) */
.svc-card:disabled,
.svc-card.is-disabled {
  cursor: not-allowed;
  color: var(--uob-grey-30);
  border-color: var(--uob-grey-20);
  background: var(--uob-white);
}
.svc-card:disabled .svc-card__desc,
.svc-card.is-disabled .svc-card__desc,
.svc-card:disabled .svc-card__label,
.svc-card.is-disabled .svc-card__label {
  color: var(--uob-grey-30);
}
.svc-card:disabled .svc-card__check,
.svc-card.is-disabled .svc-card__check {
  border-color: var(--uob-grey-30);
  background: transparent;
  color: transparent;
}

/* Corporate account opening — shareholder eligibility gate */
.corp-shareholder-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  margin-top: 4px;
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-md);
}
.corp-shareholder-panel__q {
  margin: 0;
  font-size: var(--uob-font-base);
  font-weight: var(--uob-fw-bold);
  line-height: 1.3;
  color: var(--uob-black);
}
.corp-shareholder-panel__lede {
  margin: 0;
  font-size: var(--uob-font-sm);
  line-height: 1.4;
  color: var(--uob-grey-40);
}
.corp-shareholder-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.corp-shareholder-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--uob-white);
  border: 1px solid var(--uob-primary);
  border-radius: var(--uob-radius-sm);
  color: var(--uob-primary);
  font-family: inherit;
  font-size: var(--uob-font-sm);
  font-weight: var(--uob-fw-bold);
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition:
    background var(--uob-motion-fast),
    border-color var(--uob-motion-fast),
    color var(--uob-motion-fast);
}
.corp-shareholder-btn:hover {
  background: var(--uob-blue-soft);
}
.corp-shareholder-btn:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
}
.corp-shareholder-btn.is-active {
  background: var(--uob-primary);
  border-color: var(--uob-primary);
  color: var(--uob-white);
}

@media (max-width: 640px) {
  .corp-shareholder-panel__actions {
    flex-direction: column;
  }
}

.svc-empty {
  grid-column: 1 / -1;
  padding: 20px 16px;
  text-align: center;
  color: var(--uob-grey-40);
  font-size: var(--uob-font-sm);
  font-style: italic;
  border: 1px dashed var(--uob-grey-20);
  border-radius: var(--uob-radius-md);
}

.branch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 2px;
}

.branch-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--uob-white);
  border: 1px solid var(--uob-border);
  border-radius: var(--uob-radius-md);
  cursor: pointer;
  text-align: left;
  transition:
    border-color var(--uob-motion-fast),
    background var(--uob-motion-fast),
    box-shadow var(--uob-motion-fast);
}
.branch-row:hover {
  border-color: var(--uob-primary);
  background: var(--uob-blue-soft);
}
.branch-row.is-selected {
  border-color: var(--uob-primary);
  background: var(--uob-blue-soft);
  box-shadow: 0 0 0 2px var(--rsvp-focus-ring);
}
.branch-row:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
}
.branch-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.branch-row__name {
  font-size: var(--uob-font-base);
  font-weight: var(--uob-fw-bold);
}
.branch-row__addr {
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
}
.branch-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.branch-row__distance {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
}

/* ── SCREEN 2: SERVICE CATALOGUE ── */
.basket-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.basket-counter {
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
}
.basket-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.basket-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  border-radius: var(--uob-radius-full);
  background: var(--uob-grey-10);
  font-size: var(--uob-font-sm);
}
.basket-chip__seg {
  font-size: var(--uob-font-xs);
  font-weight: var(--uob-fw-bold);
  text-transform: uppercase;
  color: var(--uob-grey-40);
  letter-spacing: 0.05em;
}
.basket-chip__remove {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--uob-grey-40);
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: var(--uob-radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.basket-chip__remove:hover {
  background: var(--uob-grey-20);
  color: var(--uob-black);
}
.basket-chip__remove:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
}

.svc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.svc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--uob-white);
  border: 1px solid var(--uob-border);
  border-radius: var(--uob-radius-md);
  transition:
    border-color var(--uob-motion-fast),
    background var(--uob-motion-fast);
}
.svc-row:hover {
  border-color: var(--uob-primary);
  background: var(--uob-blue-soft);
}
.svc-row.is-selected {
  border-color: var(--uob-primary);
  background: var(--uob-blue-soft);
}
.svc-row.is-disabled {
  background: var(--uob-grey-10);
  cursor: not-allowed;
}
.svc-row__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.svc-row__name {
  font-size: var(--uob-font-base);
  font-weight: var(--uob-fw-bold);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.svc-row__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.svc-row__action {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── SCREEN 3: INTERIM OFFLOAD ── */
.offload-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Sequential fade-in for the selected service cards on step 3.
   Branch summary card (no .has-select) is excluded so the first
   .has-select card appears first, then the next staggers in. */
@keyframes offloadCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#step-3 .offload-stack > .offload-card.has-select {
  opacity: 0;
  animation: offloadCardFadeIn 420ms ease-out both;
  animation-delay: 120ms;
  border-color: var(--uob-primary);
}
#step-3 .offload-stack > .offload-card.has-select ~ .offload-card.has-select {
  animation-delay: 520ms;
}
@media (prefers-reduced-motion: reduce) {
  #step-3 .offload-stack > .offload-card.has-select {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
.offload-card {
  box-sizing: content-box;
  border: 1px solid var(--uob-border);
  background: var(--uob-white);
  border-radius: var(--uob-radius-lg);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Status badge — UOB blue circle with a white tick paired with the segment
   label inside a single 4px-radius pill. Sits at the leading edge of every
   offload card's meta row. */
.offload-card .svc-row__meta {
  align-items: center;
  width: 100%;
}
.offload-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 3px;
  border-radius: 4px;
  background: var(--uob-blue-soft);
  line-height: 1;
}
.offload-card__badge .basket-chip__seg {
  color: var(--uob-primary);
}
.offload-card__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--uob-radius-full);
  background: var(--uob-primary);
  color: var(--uob-white);
  flex-shrink: 0;
}
.offload-card__check svg {
  display: block;
}

/* Screen 3 selection column — checkbox visually styled as the blue tick badge.
   Default visual is the filled blue circle with a white tick (matches the
   existing .offload-card__check rules above). Unchecking removes the
   service from the basket, after which state subscriber rebuilds the card,
   so the "unchecked" rendering below is only seen mid-animation / focus. */
.offload-card.has-select {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 14px;
  align-items: start;
}
.offload-card.has-select > .offload-card__head {
  grid-column: 2;
  min-width: 0;
}
.offload-card.has-select > .offload-card__actions {
  grid-column: 2;
}

.offload-card__select {
  grid-column: 1;
  grid-row: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2px;
  position: relative;
}
.offload-card__select-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.offload-card__select-input:not(:checked) + .offload-card__check {
  background: transparent;
  border: 2px solid var(--uob-primary);
  color: transparent;
}
.offload-card__select-input:focus-visible + .offload-card__check {
  outline: 2px solid var(--uob-primary);
  outline-offset: 2px;
}
.offload-card__select:hover
  .offload-card__select-input:checked
  + .offload-card__check,
.offload-card__select-input:hover:checked + .offload-card__check {
  background: var(--primary-light);
}
.offload-card__select:hover
  .offload-card__select-input:not(:checked)
  + .offload-card__check,
.offload-card__select-input:hover:not(:checked) + .offload-card__check {
  border-color: var(--primary-light);
}

/* Step 3 branch summary card: centered badge + title (no select column).
   Scoped to #step-3 branch card layout. */
#step-3 .offload-card.handoff-branch-card {
  align-items: center;
  text-align: center;
  border-color: var(--uob-white);
}
#step-3 .offload-card.handoff-branch-card > .svc-row__meta {
  justify-content: center;
  width: auto;
}
#step-3 .offload-card.handoff-branch-card > .offload-card__title {
  text-align: center;
}

.offload-card.is-recommended {
  border-color: var(--uob-primary);
  box-shadow: 0 0 0 2px var(--rsvp-focus-ring-soft);
}
/* "You can do this online" — full-width of tag column; 4px corners (not pill). */
.offload-card__tag-slot .tag.tag--brand,
.offload-card.has-media .offload-card__media .tag.tag--brand,
.offload-card.has-online-tag > .tag.tag--brand {
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: var(--uob-font-xs);
  border-radius: 4px;
  box-sizing: border-box;
}
.offload-card__tag-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}
.offload-card__tag-slot .tag.tag--brand {
  align-self: stretch;
}
/* "You can do this online" hoisted to the top of the card as an edge-to-edge
   banner. The article switches to a flex column with zero padding so the tag
   touches both side edges; the original grid layout (tick column + body)
   moves into `.offload-card__inner` which carries the original padding. */
.offload-card.has-online-tag {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.offload-card.has-online-tag > .tag.tag--brand {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 2px;
  /* 18px article padding + 32px tick column + 14px gap = 64px, so banner
     copy lines up with the card title (h3.offload-card__title). */
  padding: 10px 18px 10px 64px;
  border-radius: 0;
  box-sizing: border-box;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Left-to-right sheen across the online banner background, fired once
   after the card finishes its fade-in (520ms delay + 420ms duration). */
.offload-card.has-online-tag > .tag.tag--brand::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 60%;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--white) 0%, transparent) 0%,
    color-mix(in srgb, var(--white) 38%, transparent) 50%,
    color-mix(in srgb, var(--white) 0%, transparent) 100%
  );
  transform: translateX(-100%);
  pointer-events: none;
  z-index: 0;
  animation: tagBrandSwipe 1100ms ease-out 1000ms 1 forwards;
}
.offload-card.has-online-tag > .tag.tag--brand > * {
  position: relative;
  z-index: 1;
}
@keyframes tagBrandSwipe {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(280%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .offload-card.has-online-tag > .tag.tag--brand::before {
    animation: none;
    display: none;
  }
}

/* All offload-service CTAs on step 3 share a filled primary-light look so
   the recommended (btn-primary) and non-recommended (btn-outline)
   buttons read the same. */
#step-3 .offload-stack .offload-card .offload-card__actions .btn {
  background: var(--primary-light);
  color: var(--uob-white);
  border-color: var(--primary-light);
}
#step-3
  .offload-stack
  .offload-card
  .offload-card__actions
  .btn:hover:not(:disabled) {
  background: var(--element-12);
  border-color: var(--element-12);
}
#step-3
  .offload-stack
  .offload-card
  .offload-card__actions
  .btn:active:not(:disabled) {
  background: var(--element-14);
  border-color: var(--element-14);
}

/* Slow infinite pulse on every offload-service CTA. Starts after the
   card fade-in (~940ms) + sheen sweep (~2100ms) so the attention-
   grabbing pulse feels intentional. */
@keyframes ctaPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--rsvp-pulse-ring);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 8px
      color-mix(in srgb, var(--primary-light) 0%, transparent);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-light) 0%, transparent);
  }
}
#step-3 .offload-stack .offload-card .offload-card__actions .btn {
  transform-origin: center;
  animation: ctaPulse 2200ms ease-in-out 2200ms infinite;
  will-change: transform, box-shadow;
}
@media (prefers-reduced-motion: reduce) {
  #step-3 .offload-stack .offload-card .offload-card__actions .btn {
    animation: none;
  }
}
.offload-card.has-online-tag > .tag.tag--brand .tag__title,
.offload-card.has-online-tag > .tag.tag--brand .tag__desc {
  display: block;
  width: 100%;
}
.offload-card.has-online-tag > .tag.tag--brand .tag__title {
  font-family: var(--font-primary-bold);
  font-size: var(--uob-h5-size);
  font-weight: var(--uob-fw-bold);
  line-height: 1.25;
}
.offload-card.has-online-tag > .tag.tag--brand .tag__desc {
  font-size: var(--uob-caption-size);
  font-weight: var(--uob-fw-regular);
  line-height: 1.35;
  letter-spacing: 0;
}
.offload-card.has-online-tag > .offload-card__inner {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 14px;
  row-gap: 12px;
  align-items: start;
  padding: 18px 18px 16px;
}
.offload-card.has-online-tag > .offload-card__inner > .offload-card__select {
  grid-column: 1;
  grid-row: 1 / -1;
}
.offload-card.has-online-tag > .offload-card__inner > .offload-card__head {
  grid-column: 2;
  min-width: 0;
}
.offload-card.has-online-tag > .offload-card__inner > .offload-card__actions {
  grid-column: 2;
}
.offload-card__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.offload-card__body,
.offload-card__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.offload-card.has-media .offload-card__content {
  gap: 0;
}
.offload-card__media {
  margin: 0;
  flex-shrink: 0;
}
.offload-card.has-media .offload-card__media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.offload-card__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--uob-radius-md);
}
/* Mobile: title/description, then image, then CTA (DOM order). */
.offload-card.has-media .offload-card__actions {
  margin-top: 10px;
}
@media (min-width: 641px) {
  /* Desktop: copy + CTA on the left; image on the right. */
  .offload-card.has-media .offload-card__head {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    column-gap: 28px;
    row-gap: 10px;
    align-items: start;
  }
  .offload-card.has-media .offload-card__content {
    grid-column: 1;
    grid-row: 1;
  }
  .offload-card.has-media .offload-card__actions {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
  }
  .offload-card.has-media .offload-card__media {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }
  /* Cards without media: tag pinned to the top-right column, body on the
     left. Only when a .offload-card__tag-slot is present — branch-only
     locked cards (.has-select, no tag slot) keep the default flex head
     so content spans the full width. */
  .offload-card.is-recommended:not(.has-media) .offload-card__head:has(.offload-card__tag-slot),
  .offload-card.has-select:not(.has-media) .offload-card__head:has(.offload-card__tag-slot) {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    column-gap: 28px;
    align-items: start;
  }
  .offload-card.is-recommended:not(.has-media) .offload-card__body,
  .offload-card.has-select:not(.has-media) .offload-card__body {
    grid-column: 1;
    grid-row: 1;
  }
  .offload-card.is-recommended:not(.has-media) .offload-card__tag-slot,
  .offload-card.has-select:not(.has-media) .offload-card__tag-slot {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
  /* Locked / branch-only cards: no tag-slot in the head, so use full width. */
  .offload-card.is-recommended:not(.has-media) .offload-card__head:not(:has(.offload-card__tag-slot)),
  .offload-card.has-select:not(.has-media) .offload-card__head:not(:has(.offload-card__tag-slot)) {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  /* When the online tag is hoisted to the top of the card (and there's
     no image), the head no longer needs a 2-column split for body +
     tag-slot — body spans the full head width. With-image cards
     (.has-media) keep their own content | image desktop grid above. */
  .offload-card.has-online-tag:not(.has-media) .offload-card__head {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .offload-card.has-online-tag:not(.has-media) .offload-card__body {
    grid-column: auto;
    grid-row: auto;
  }
}
.offload-card__title {
  font-family: var(--font-primary-bold);
  font-size: var(--uob-font-md);
  font-weight: var(--uob-fw-bold);
}
.offload-card__desc {
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
}
.offload-card__desc-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.offload-card__desc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.offload-card__desc-heading {
  margin: 0;
  font-size: var(--uob-font-sm);
  font-weight: var(--uob-fw-bold);
  color: var(--uob-grey-40);
}
.offload-card__desc--bullets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 1.15em;
  list-style: disc;
}
.offload-card__desc--bullets li {
  padding-left: 0.15em;
}
.offload-card__desc--numbered {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 1.35em;
  list-style: decimal;
}
.offload-card__desc--numbered li {
  padding-left: 0.15em;
}
.offload-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.offload-card__actions .btn {
  min-width: 0;
}
.offload-card__remove {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
}

.continue-branch-bar {
  margin-top: 8px;
  padding: 14px 0 0;
  background: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
}
.continue-branch-bar .step-nav__group {
  width: 100%;
  justify-content: center;
}
.continue-branch-bar .step-nav__group--plain {
  background: none;
}
.continue-branch-bar .step-nav__group--plain .btn-ghost,
.continue-branch-bar .step-nav__group--plain .btn-ghost:hover:not(:disabled),
.continue-branch-bar .step-nav__group--plain .btn-ghost:active:not(:disabled) {
  background: none;
}
.continue-branch-bar .btn-primary {
  width: 100%;
  justify-content: center;
}
.continue-branch-bar .step-nav__group--stacked {
  flex-direction: column;
  gap: 10px;
}
.continue-branch-bar .step-nav__group--stacked .btn {
  width: 100%;
  justify-content: center;
}

/* ── SCREEN 4: HAND-OFF ── */
.handoff-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.handoff-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--uob-grey-10);
}
.handoff-row:last-of-type {
  border-bottom: none;
}

/* When the hand-off summary is rendered as a vertical stack of cards
   (matching the offload-stack pattern from screen 3), each row already
   sits inside its own bordered card, so collapse the row's own padding
   and separator. */
.handoff-stack .offload-card:has(> .handoff-row) {
  padding: 16px 18px;
}
.handoff-stack .handoff-row {
  padding: 0;
  border-bottom: none;
  align-items: center;
}
.handoff-stack__label {
  margin: 0 0 -4px;
  font-size: var(--uob-h4-size);
  font-weight: var(--uob-h4-weight);
  color: var(--uob-primary);
}

/* Service summary cards on the hand-off screen mirror the offload-card
   badge + title pattern from screen 3 — segment label sits in a blue
   pill at the top, and the service name renders as the card title. */
.handoff-service-card .offload-card__title {
  font-size: var(--uob-font-md);
}
.handoff-row__label {
  font-size: var(--uob-font-xs);
  text-transform: uppercase;
  font-weight: var(--uob-fw-bold);
  letter-spacing: 0.06em;
  color: var(--uob-grey-40);
}
.handoff-row__value {
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
}

.handoff-url {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--uob-font-sm);
  background: var(--uob-grey-10);
  padding: 14px 16px;
  border-radius: var(--uob-radius-md);
  word-break: break-all;
  overflow-wrap: anywhere;
  border: 1px solid var(--uob-border);
}

/* ── EMPTY STATE / FALLBACKS ── */
.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--uob-grey-40);
  font-size: var(--uob-font-sm);
  background: var(--uob-white);
  border: 1px dashed var(--uob-grey-20);
  border-radius: var(--uob-radius-md);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  :root {
    --rsvp-card-pad: 18px;
    --rsvp-section-gap: 22px;
  }
  .step-title {
    text-align: center;
  }
  .branch-search-row {
    grid-template-columns: 1fr;
  }
  .branch-search-row .branch-dd-helper {
    grid-row: 2;
  }
  .branch-search-row .dd-field {
    grid-row: 3;
  }
  .branch-search-row .service-add-second {
    grid-column: 1;
    grid-row: 4;
    width: 100%;
  }
  /* Keep the clear button beside the dropdown on mobile as well, matching the
     desktop layout — the .service-row grid (1fr auto) already handles this. */
  .handoff-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .app-header__inner {
    flex-wrap: wrap;
    row-gap: 12px;
  }
  .app-header__filter {
    width: 100%;
    justify-content: space-between;
  }

  .offload-card__actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* "Service available online" — fixed width so the tag wraps to a stable
     "Service / available / online" stack on every row, keeping all rows
     visually aligned. The tag lives in column 2 of the grid (sibling of
     title + description), so its multi-line wrap doesn't push the title
     and description apart. */
  .dd-option--service > .dd-option__main > .tag.tag--success {
    --service-online-tag-width: 4.375rem;
    width: var(--service-online-tag-width);
    min-width: var(--service-online-tag-width);
    max-width: var(--service-online-tag-width);
    box-sizing: border-box;
    display: inline-block;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

/* ── PERSISTENT SERVICE-SELECTION FOOTER ── */
.svc-footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  background: var(--rsvp-footer-bg);
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  border-top: 1px solid var(--rsvp-border-faint);
  box-shadow: 0 -6px 24px var(--rsvp-border-faint);
  transform: translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    visibility 0s linear 220ms;
}
.svc-footer.is-visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    visibility 0s;
}
.svc-footer__inner {
  max-width: var(--rsvp-content-width);
  margin: 0 auto;
  padding: 14px var(--rsvp-page-pad-x);
  display: flex;
  align-items: center;
  gap: 16px;
}
.svc-footer__back {
  flex: 0 0 auto;
  margin-right: auto;
}
.svc-footer__left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.svc-footer__status {
  font-weight: var(--uob-fw-medium);
  color: var(--uob-grey-70);
}
.svc-footer__status-mobile {
  display: none;
}
.svc-footer__status-mobile > span {
  display: block;
}
.svc-footer__count {
  font-weight: var(--uob-fw-medium);
  color: var(--uob-grey-70);
}
.svc-footer__right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Compensate fixed footer so content isn't covered. */
.app-main {
  padding-bottom: 96px;
}

@media (max-width: 640px) {
  .svc-footer__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px var(--rsvp-page-pad-x);
  }
  .svc-footer__left {
    order: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .svc-footer__right {
    order: 2;
  }
  .svc-footer__right .btn {
    width: 100%;
    justify-content: center;
  }
  .svc-footer__back {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .svc-footer__status {
    display: none;
  }
  .svc-footer__status-mobile {
    display: block;
    line-height: 1.25;
  }
  .app-main {
    padding-bottom: 160px;
  }
}
