/*
 * WDS design system — shared component layer (dev.307)
 * Late-loaded on the frontend after the surface stylesheets. Every rule is scoped to a WDS container
 * (`.wdsbm-ui` roots or a named WDS component), so nothing here styles the theme or other plugins.
 * Replaces the dev.248 wds-ui-stabilization.css layer; its selectors for non-existent containers
 * (.wdsbm-staff-panel, .wdsbm-staff-shell, .wdsbm-global-calendar, .wdsbm-customer-account …) were dropped.
 */

/* Foundations for every WDS root */
.wdsbm-ui { font-family: inherit; -webkit-font-smoothing: antialiased; }
.wdsbm-ui :is(button, input, select, textarea) { font-family: inherit; }
.wdsbm-ui *, .wdsbm-ui *::before, .wdsbm-ui *::after { box-sizing: border-box; }
.wdsbm-ui img { max-width: 100%; height: auto; }
.wdsbm-ui :is(input, select, textarea) { max-width: 100%; }
.wdsbm-ui .screen-reader-text,
.wdsbm-ui .wdsbm-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Status badge (shared component; the Staff Panel and customer portal use the same tones) */
.wdsbm-ui .wdsbm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border: 1px solid var(--wdsbm-info-line);
  border-radius: var(--wdsbm-radius-pill);
  background: var(--wdsbm-info-soft);
  color: var(--wdsbm-info);
  font-size: var(--wdsbm-fs-xs);
  font-weight: var(--wdsbm-fw-semibold);
  line-height: 1.35;
  white-space: nowrap;
}
.wdsbm-ui .wdsbm-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wdsbm-ui .wdsbm-badge.is-success { border-color: var(--wdsbm-success-line); background: var(--wdsbm-success-soft); color: var(--wdsbm-success); }
.wdsbm-ui .wdsbm-badge.is-warning { border-color: var(--wdsbm-warning-line); background: var(--wdsbm-warning-soft); color: var(--wdsbm-warning); }
.wdsbm-ui .wdsbm-badge.is-danger { border-color: var(--wdsbm-danger-line); background: var(--wdsbm-danger-soft); color: var(--wdsbm-danger); }
.wdsbm-ui .wdsbm-badge.is-accent { border-color: var(--wdsbm-accent-line); background: var(--wdsbm-accent-soft); color: var(--wdsbm-accent); }
.wdsbm-ui .wdsbm-badge.is-ink { border-color: var(--wdsbm-ink); background: var(--wdsbm-ink); color: var(--wdsbm-on-ink); }
.wdsbm-ui .wdsbm-badge.is-muted { border-color: var(--wdsbm-border); background: var(--wdsbm-surface); color: var(--wdsbm-text-muted); }

/* Loading indicator (aria-busy on any WDS control or region) */
.wdsbm-ui [aria-busy="true"] { position: relative; cursor: progress; }
.wdsbm-ui .button[aria-busy="true"],
.wdsbm-ui button[aria-busy="true"] { color: transparent !important; -webkit-text-fill-color: transparent !important; }
.wdsbm-ui .button[aria-busy="true"]::after,
.wdsbm-ui button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--wdsbm-on-ink);
  border-right-color: transparent;
  border-radius: 50%;
  animation: wdsbm-spin .7s linear infinite;
}
.wdsbm-ui .button.is-secondary[aria-busy="true"]::after { border-color: var(--wdsbm-ink); border-right-color: transparent; }
@keyframes wdsbm-spin { to { transform: rotate(360deg); } }

/* Private request wizard rhythm (carried over from dev.248; still live) */
.wdsbm-private-quote { width: min(100%, 1180px); margin-inline: auto; box-sizing: border-box; }
.wdsbm-private-quote .wdsbm-q-actions { align-items: center; gap: var(--wdsbm-space-3); }
.wdsbm-private-quote .wdsbm-q-actions .button { min-width: 132px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.15; text-decoration: none; }
.wdsbm-private-quote .wdsbm-q-cards label { box-sizing: border-box; }
.wdsbm-private-quote .wdsbm-request-received { margin-block: 0; }
.wdsbm-private-quote :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--wdsbm-focus-color); outline-offset: 3px; }
@media (max-width: 760px) {
  .wdsbm-private-quote { width: 100%; max-width: 100%; }
  .wdsbm-private-quote .wdsbm-q-actions { gap: 10px; }
  .wdsbm-private-quote .wdsbm-q-actions .button { min-width: 0; }
  .wdsbm-private-quote :is(input, select, textarea) { font-size: 16px; } /* prevents iOS zoom on focus */
}

/* Reduced motion for every WDS surface */
@media (prefers-reduced-motion: reduce) {
  .wdsbm-ui *, .wdsbm-ui *::before, .wdsbm-ui *::after,
  .wdsbm-private-quote *, .wdsbm-private-quote *::before, .wdsbm-private-quote *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
