/* Keep customer confirmations inside the actual visible area, including iOS keyboards. */
@media (max-width: 640px) {
  .customer-shell .smart-v15-backdrop {
    top: var(--af-sheet-top, calc(var(--af-header-height) + var(--af-safe-top)));
    bottom: auto;
    height: var(--af-sheet-height, calc(100dvh - var(--af-header-height) - var(--af-safe-top) - var(--af-nav-height) - var(--af-safe-bottom)));
  }
  .customer-shell .smart-v15-sheet { min-height: 0; }
  .customer-shell .smart-v15-sheet-body { min-height: 0; overscroll-behavior: contain; }
  .customer-shell .smart-v15-sheet-head,
  .customer-shell .smart-v15-tabs,
  .customer-shell .smart-v15-grip,
  .customer-shell .smart-v15-save { flex-shrink: 0; }
  body.keyboard-open .customer-shell .smart-v15-save { margin-bottom: 12px; }
  body.keyboard-open .customer-shell .smart-v15-sheet-body { padding-bottom: 18px; }
  .customer-shell .smart-v15-wheel,
  .customer-shell .smart-v15-pop {
    top: var(--af-visible-top, 0px);
    bottom: auto;
    height: var(--af-visible-height, 100dvh);
    box-sizing: border-box;
  }
  .customer-shell .smart-v15-wheel { padding-top: max(8px, var(--af-safe-top)); }
  .customer-shell .smart-v15-wheel-card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-height: 100%;
    min-height: 0;
    padding-bottom: max(12px, var(--af-safe-bottom));
  }
  body.keyboard-open .customer-shell .smart-v15-wheel-card { padding-bottom: 12px; }
  .customer-shell .smart-v15-wheel-card > strong,
  .customer-shell .smart-v15-wheel-actions { flex-shrink: 0; }
  .customer-shell .smart-v15-wheels { height: 180px; min-height: 40px; flex-shrink: 1; }
  .customer-shell .smart-v15-wheel-col { height: 100%; min-height: 0; overscroll-behavior: contain; }
  .customer-shell .smart-v15-pop-card { max-height: 100%; overflow-y: auto; }
}
/* Preserve contrast for the existing time editor in both approved themes. */
.customer-shell .smart-v15-wheel-card { background: var(--af-panel); border-color: var(--af-line); }
.customer-shell .smart-v15-wheel-card > strong,
.customer-shell .smart-v15-wheels > span,
.customer-shell .smart-v15-wheel-actions button { color: var(--af-muted); }
.customer-shell .smart-v15-wheel-col { background: var(--af-raised); border-color: var(--af-line); }
.customer-shell .smart-v15-wheel-col button { color: var(--af-muted); }
.customer-shell .smart-v15-wheel-col button.active { color: var(--af-accent); background: var(--af-accent-bg); }
.customer-shell .smart-v15-wheel-actions button { border-color: var(--af-line); }
.customer-shell .smart-v15-wheel-actions button.primary { background: var(--af-cta); color: var(--af-ink); }
