/*
 * Yatoon Design System 4.4
 * Shared visual language for booking, admin, customer and staff surfaces.
 */
:root {
  --y4-primary: var(--primary-color, var(--yatoon-skin-primary-btn-bg, #db2777));
  --y4-primary-strong: color-mix(in srgb, var(--y4-primary) 82%, #111827);
  --y4-primary-soft: color-mix(in srgb, var(--y4-primary) 10%, #ffffff);
  --y4-canvas: #f6f7fb;
  --y4-surface: #ffffff;
  --y4-surface-raised: #ffffff;
  --y4-text: #172033;
  --y4-muted: #667085;
  --y4-subtle: #98a2b3;
  --y4-border: #e4e7ec;
  --y4-border-strong: #d0d5dd;
  --y4-success: #14804a;
  --y4-warning: #b54708;
  --y4-danger: #b42318;
  --y4-info: #175cd3;
  --y4-radius-sm: 9px;
  --y4-radius-md: 14px;
  --y4-radius-lg: 20px;
  --y4-radius-xl: 26px;
  --y4-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --y4-shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --y4-shadow-lg: 0 20px 48px rgba(16, 24, 40, .12);
  --y4-focus: 0 0 0 3px color-mix(in srgb, var(--y4-primary) 22%, transparent);
  --y4-ease: cubic-bezier(.2, .8, .2, 1);
  --y4-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sbs-booking-container,
.sbs-portal-wrap,
.yatoon-manage-wrap,
.yatoon-staff-portal-page,
body.yatoon-app-shell-on {
  color: var(--y4-text);
  font-family: var(--y4-font);
  -webkit-font-smoothing: antialiased;
}

.sbs-booking-container *,
.sbs-portal-wrap *,
.yatoon-manage-wrap *,
.yatoon-staff-portal-page *,
body.yatoon-app-shell-on * {
  box-sizing: border-box;
}

.sbs-booking-container :is(button, a, input, select, textarea):focus-visible,
.sbs-portal-wrap :is(button, a, input, select, textarea):focus-visible,
.yatoon-manage-wrap :is(button, a, input, select, textarea):focus-visible,
.yatoon-staff-portal-page :is(button, a, input, select, textarea):focus-visible,
body.yatoon-app-shell-on :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--y4-primary);
  outline-offset: 2px;
  box-shadow: var(--y4-focus);
}

/* Long names must remain readable in translated and customer-authored data. */
.sbs-booking-container :is(.sbs-service-name, .sbs-service-item h3, .sbs-option-name, .sbs-staff-name, .sbs-summary-value),
.sbs-portal-wrap :is(h1, h2, h3, td),
.yatoon-manage-wrap :is(h1, h2, h3, td),
.yatoon-staff-portal-page :is(h1, h2, h3, td) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Shared semantic feedback states across public and admin surfaces. */
:is(.sbs-booking-container, .sbs-portal-wrap, .yatoon-manage-wrap, .yatoon-staff-portal-page, body.yatoon-app-shell-on) :is(.is-loading, [aria-busy="true"]) {
  cursor: progress;
}

:is(.sbs-booking-container, .sbs-portal-wrap, .yatoon-manage-wrap, .yatoon-staff-portal-page, body.yatoon-app-shell-on) :is(button, [role="button"])[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .55;
}

.yatoon-state-message {
  padding: 12px 14px;
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-md);
  background: var(--y4-surface);
  color: var(--y4-text);
}

.yatoon-state-message.is-success { border-color: color-mix(in srgb, var(--y4-success) 34%, white); color: var(--y4-success); }
.yatoon-state-message.is-warning { border-color: color-mix(in srgb, var(--y4-warning) 34%, white); color: var(--y4-warning); }
.yatoon-state-message.is-error { border-color: color-mix(in srgb, var(--y4-danger) 34%, white); color: var(--y4-danger); }

/* Customer booking */
.sbs-booking-container {
  width: min(1700px, calc(100% - 32px));
  margin: 32px auto;
  background: transparent;
}

.sbs-booking-layout {
  align-items: flex-start;
  gap: 28px;
}

.sbs-booking-main {
  min-width: 0;
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-xl);
  background: var(--y4-surface);
  box-shadow: var(--y4-shadow-md);
  overflow: visible;
}

.sbs-form-step {
  padding: clamp(22px, 4vw, 42px);
}

.sbs-form-step > h1,
.sbs-form-step > h2 {
  color: var(--y4-text);
  letter-spacing: -.03em;
  line-height: 1.12;
}

.sbs-venue-hero {
  border: 0;
  border-bottom: 1px solid var(--y4-border);
  border-radius: 0;
  background:
    radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--y4-primary) 12%, transparent), transparent 42%),
    linear-gradient(-135deg, #fff 0%, #fbfbfd 100%);
  padding: clamp(24px, 4vw, 40px);
}

.sbs-venue-trust-strip,
.sbs-checkout-trust-strip {
  border: 1px solid transparent;
  border-radius: var(--y4-radius-md);
  background: #fbfcfe;
  color: var(--y4-muted);
}

.sbs-appt-type-wrap {
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid transparent;
  border-radius: var(--y4-radius-lg);
  background: #fbfcfe;
}

.sbs-appt-type-label {
  color: var(--y4-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sbs-appt-type-card {
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: var(--y4-radius-md);
  background: var(--y4-surface);
  box-shadow: var(--y4-shadow-sm);
  transition: border-color .18s var(--y4-ease), transform .18s var(--y4-ease), box-shadow .18s var(--y4-ease);
}

.sbs-appt-type-card:hover {
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: var(--y4-shadow-md);
}

.sbs-appt-type-card.active,
.sbs-appt-type-card.is-selected {
  border-color: transparent;
  background: var(--y4-primary-soft);
  box-shadow: none;
}

.sbs-category-tabs-wrap {
  position: sticky;
  top: var(--yatoon-sticky-offset, 0);
  z-index: 20;
  margin: 0 -4px 14px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, .94);
  background: color-mix(in srgb, #fff 94%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.sbs-category-tabs {
  gap: 8px;
  scrollbar-width: none;
}

.sbs-category-tab,
.sbs-cat-tab,
#sbs-cat-more-btn {
  min-height: 40px;
  border: 1px solid var(--y4-border);
  border-radius: 999px;
  background: #fff;
  color: var(--y4-muted);
  font-weight: 650;
  white-space: nowrap;
}

.sbs-category-tab:hover,
.sbs-cat-tab:hover,
#sbs-cat-more-btn:hover {
  border-color: var(--y4-border-strong);
  color: var(--y4-text);
}

.sbs-category-tab.active,
.sbs-cat-tab.active {
  border-color: var(--y4-text);
  background: var(--y4-text);
  color: #fff;
}

.sbs-services-list > [hidden] {
  display: none !important;
}

.sbs-service-desc-wrap.is-expanded {
  display: block !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  max-height: none !important;
}

.sbs-service-desc-wrap.is-expanded .sbs-desc-full {
  display: inline !important;
  white-space: normal;
}

.sbs-service-desc-wrap .sbs-read-more {
  appearance: none;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 28px !important;
  margin: 3px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--sbs-readmore, var(--y4-primary)) !important;
  font: inherit;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.4 !important;
  text-transform: none !important;
  cursor: pointer;
}

@media (min-width: 981px) {
  .sbs-booking-container {
    width: min(1340px, calc(100% - 32px));
    max-width: min(1340px, calc(100vw - 32px)) !important;
  }

  .sbs-booking-layout {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 350px) !important;
    gap: 24px !important;
  }

  .sbs-category-tabs :is(.sbs-cat-tab, #sbs-cat-more-btn) {
    padding: 8px 12px !important;
    font-size: clamp(11px, .82vw, 12.5px) !important;
    flex: 0 0 auto !important;
  }
}

.sbs-service-search-wrap input,
.sbs-form-group :is(input, select, textarea),
.sbs-portal-wrap :is(input, select, textarea),
.ysp-editor-input,
.ysp-editor-select,
.ysp-editor-textarea {
  min-height: 46px;
  border: 1px solid var(--y4-border-strong);
  border-radius: var(--y4-radius-sm);
  background: #fff;
  color: var(--y4-text);
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.sbs-service-search-wrap input:focus,
.sbs-form-group :is(input, select, textarea):focus,
.sbs-portal-wrap :is(input, select, textarea):focus,
.ysp-editor-input:focus,
.ysp-editor-select:focus,
.ysp-editor-textarea:focus {
  border-color: var(--y4-primary);
  box-shadow: var(--y4-focus);
}

.sbs-category-title {
  margin: 30px 0 12px;
  color: var(--y4-text);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.sbs-service-item {
  position: relative;
  margin: 0 0 12px;
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-lg);
  background: var(--y4-surface);
  box-shadow: var(--y4-shadow-sm);
  transition: transform .18s var(--y4-ease), border-color .18s var(--y4-ease), box-shadow .18s var(--y4-ease);
}

.sbs-service-item:hover {
  border-color: color-mix(in srgb, var(--y4-primary) 34%, var(--y4-border));
  transform: translateY(-2px);
  box-shadow: var(--y4-shadow-md);
}

.sbs-service-item.selected {
  border-color: var(--y4-primary);
  background: linear-gradient(-135deg, #fff, var(--y4-primary-soft));
  box-shadow: var(--y4-focus);
}

.sbs-service-name,
.sbs-service-item h4 {
  color: var(--y4-text);
  font-weight: 750;
  letter-spacing: -.015em;
}

.sbs-service-description,
.sbs-service-desc,
.sbs-service-duration {
  color: var(--y4-muted);
}

.sbs-service-price {
  color: var(--y4-text);
  font-weight: 750;
}

.sbs-book-btn,
.sbs-btn,
.sbs-btn-next,
.sbs-btn-submit,
.sbs-btn-add,
.sbs-navigation-buttons button,
.sbs-portal-wrap button:not(.sbs-portal-link),
.yatoon-manage-wrap button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--y4-radius-sm);
  font: inherit;
  font-weight: 700;
  transition: transform .15s var(--y4-ease), box-shadow .15s var(--y4-ease), background .15s ease;
}

.sbs-book-btn,
.sbs-btn-next,
.sbs-btn-submit,
.sbs-btn-add {
  background: var(--y4-primary);
  color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--y4-primary) 22%, transparent);
}

.sbs-book-btn:hover,
.sbs-btn-next:hover,
.sbs-btn-submit:hover,
.sbs-btn-add:hover {
  background: var(--y4-primary-strong);
  transform: translateY(-1px);
}

.sbs-btn-back {
  border-color: var(--y4-border-strong);
  background: #fff;
  color: var(--y4-text);
  box-shadow: none;
}

.sbs-loading {
  min-height: 112px;
  border: 1px dashed var(--y4-border-strong);
  border-radius: var(--y4-radius-md);
  background: #fbfcfe;
  color: var(--y4-muted);
}

.sbs-staff-card,
.sbs-option-item,
.sbs-time-slot,
.sbs-date-shortcut {
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-md);
  background: #fff;
  box-shadow: var(--y4-shadow-sm);
}

.sbs-staff-card.selected,
.sbs-option-item.selected,
.sbs-time-slot.selected,
.sbs-date-shortcut.active {
  border-color: var(--y4-primary);
  background: var(--y4-primary-soft);
  box-shadow: var(--y4-focus);
}

.sbs-booking-sidebar {
  position: sticky;
  top: 24px;
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-lg);
  background: #fff;
  box-shadow: var(--y4-shadow-md);
  overflow: clip;
}

.sbs-booking-summary {
  border: 0;
  border-radius: 0;
  background: #fff;
}

.sbs-summary-item {
  border-color: var(--y4-border);
}

.sbs-summary-edit-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--y4-border);
  border-radius: 50%;
  background: #fff;
  color: var(--y4-muted);
}

.sbs-progress-bar {
  padding: 18px 28px 8px;
  border-bottom: 1px solid var(--y4-border);
  background: #fff;
}

#sbs-toast,
.ysp-toast {
  border-radius: var(--y4-radius-md);
  box-shadow: var(--y4-shadow-lg);
}

/* Customer and manage portals */
.sbs-portal-wrap,
.yatoon-manage-wrap {
  width: min(780px, calc(100% - 32px));
  margin: 32px auto;
}

.sbs-portal-card,
.sbs-portal-login,
.sbs-portal-booking,
.yatoon-manage-card,
.yatoon-manage-panel {
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-lg);
  background: #fff;
  box-shadow: var(--y4-shadow-md);
}

.sbs-portal-badge,
.yatoon-status-badge {
  border-radius: 999px;
  font-weight: 700;
}

/* Staff portal */
.yatoon-staff-portal-page {
  margin: 0;
  background: var(--y4-canvas);
}

#ysp-app {
  min-height: 100dvh;
  background: var(--y4-canvas);
}

.ysp-topbar {
  border-bottom: 1px solid var(--y4-border);
  background: color-mix(in srgb, #fff 94%, transparent);
  box-shadow: var(--y4-shadow-sm);
  backdrop-filter: blur(14px);
}

.ysp-topbar-name {
  color: var(--y4-text);
  font-weight: 780;
  letter-spacing: -.02em;
}

.ysp-topbar-sub,
.ysp-last-sync {
  color: var(--y4-muted);
}

.ysp-icon-button,
.ysp-refresh-btn,
.ysp-topbar-logout,
.ysp-calendar-options {
  border: 1px solid var(--y4-border);
  border-radius: 12px;
  background: #fff;
  color: var(--y4-text);
  box-shadow: var(--y4-shadow-sm);
}

.ysp-calendar-toolbar,
.ysp-day-tabs,
.ysp-staff-tabs {
  background: var(--y4-canvas);
}

.ysp-view-switch {
  padding: 4px;
  border: 1px solid var(--y4-border);
  border-radius: 12px;
  background: #eef1f6;
}

.ysp-view-switch button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--y4-muted);
  font-weight: 700;
}

.ysp-view-switch button.active {
  background: #fff;
  color: var(--y4-text);
  box-shadow: var(--y4-shadow-sm);
}

.ysp-schedule {
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

.ysp-booking-card,
.ysp-today-command,
.ysp-customer-card {
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-md);
  background: #fff;
  box-shadow: var(--y4-shadow-sm);
}

.ysp-booking-card {
  transition: transform .15s var(--y4-ease), box-shadow .15s var(--y4-ease);
}

.ysp-booking-card:active {
  transform: scale(.99);
}

.ysp-bottom-nav {
  right: 50%;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  width: min(560px, calc(100% - 20px));
  border: 1px solid color-mix(in srgb, var(--y4-border) 88%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, #fff 94%, transparent);
  box-shadow: var(--y4-shadow-lg);
  transform: translateX(50%);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.ysp-bottom-nav-btn {
  min-width: 0;
  min-height: 62px;
  border-radius: 14px;
  color: var(--y4-muted);
}

.ysp-bottom-nav-btn.active {
  background: var(--y4-primary-soft);
  color: var(--y4-primary-strong);
}

.ysp-bottom-nav-icon {
  font-size: 0;
}

.ysp-bottom-nav-btn[data-view="today"] .ysp-bottom-nav-icon::before { content: "●"; }
.ysp-bottom-nav-btn[data-view="calendar"] .ysp-bottom-nav-icon::before { content: "▦"; }
.ysp-bottom-nav-btn[data-view="clients"] .ysp-bottom-nav-icon::before { content: "◎"; }
.ysp-bottom-nav-btn[data-view="checkout"] .ysp-bottom-nav-icon::before { content: "$"; }
.ysp-bottom-nav-btn[data-view="messages"] .ysp-bottom-nav-icon::before { content: "✉"; }
#ysp-bottom-more-btn .ysp-bottom-nav-icon::before { content: "•••"; }
.ysp-bottom-nav-icon::before {
  font-size: 19px;
  line-height: 1;
}

.ysp-overlay {
  background: rgba(16, 24, 40, .48);
  backdrop-filter: blur(4px);
}

.ysp-sheet {
  border: 1px solid var(--y4-border);
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: var(--y4-shadow-lg);
}

.ysp-sheet-handle {
  background: var(--y4-border-strong);
}

.ysp-login-logo {
  background: var(--y4-primary);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--y4-primary) 28%, transparent);
}

.ysp-numpad-btn {
  border: 1px solid var(--y4-border);
  background: #fff;
  color: var(--y4-text);
  box-shadow: var(--y4-shadow-sm);
}

.ysp-numpad-btn:active {
  background: var(--y4-primary-soft);
  transform: scale(.96);
}

/* Admin shell and WordPress controls */
body.yatoon-app-shell-on {
  background: var(--y4-canvas);
}

body.yatoon-app-shell-on #wpcontent {
  background: var(--y4-canvas);
}

.yatoon-app-sidebar {
  border-left: 1px solid #253044;
  background: #101828;
  box-shadow: -8px 0 28px rgba(16, 24, 40, .12);
}

.yatoon-app-brand {
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 17px;
  letter-spacing: -.02em;
}

.yatoon-app-nav-label {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
}

.yatoon-app-nav a {
  border-radius: 10px;
  color: #d0d5dd;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.yatoon-app-nav a:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: translateX(-2px);
}

.yatoon-app-nav a.is-active {
  background: color-mix(in srgb, var(--y4-primary) 26%, #172033);
  color: #fff;
  box-shadow: inset -3px 0 0 var(--y4-primary);
}

.yatoon-app-topbar {
  border-bottom: 1px solid var(--y4-border);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
}

.yatoon-app-search input {
  border: 1px solid var(--y4-border);
  border-radius: 11px;
  background: #f9fafb;
}

body.yatoon-app-shell-on .wrap {
  max-width: 1440px;
}

body.yatoon-app-shell-on :is(.postbox, .card, .sbs-card, .yatoon-card, .yc-card, .yatoon-panel) {
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-md);
  background: #fff;
  box-shadow: var(--y4-shadow-sm);
}

body.yatoon-app-shell-on :is(.widefat, .wp-list-table) {
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-md);
  background: #fff;
  box-shadow: var(--y4-shadow-sm);
  overflow: hidden;
}

body.yatoon-app-shell-on :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], select, textarea) {
  min-height: 42px;
  border-color: var(--y4-border-strong);
  border-radius: 9px;
  box-shadow: none;
}

body.yatoon-app-shell-on :is(.button, .button-primary) {
  min-height: 38px;
  border-radius: 9px;
  font-weight: 650;
}

body.yatoon-app-shell-on .button-primary {
  border-color: var(--y4-primary);
  background: var(--y4-primary);
  color: #fff;
}

body.yatoon-app-shell-on :is(.notice, .updated, .error) {
  border-radius: var(--y4-radius-sm);
  box-shadow: var(--y4-shadow-sm);
}

@media (max-width: 980px) {
  .sbs-booking-container {
    width: min(760px, calc(100% - 24px));
    margin: 18px auto;
  }

  .sbs-booking-layout {
    display: block;
  }

  .sbs-booking-sidebar {
    position: static;
    margin-top: 18px;
  }

  .sbs-booking-main {
    border-radius: var(--y4-radius-lg);
  }
}

@media (max-width: 640px) {
  .sbs-booking-container,
  .sbs-portal-wrap,
  .yatoon-manage-wrap {
    width: 100%;
    margin: 0;
  }

  .sbs-booking-main,
  .sbs-portal-card,
  .sbs-portal-login,
  .yatoon-manage-card {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sbs-form-step {
    padding: 20px 16px 112px;
  }

  .sbs-venue-hero {
    padding: 22px 16px;
  }

  .sbs-appt-type-wrap {
    padding: 14px;
  }

  .sbs-service-item {
    border-radius: var(--y4-radius-md);
  }

  .sbs-category-title {
    margin-top: 24px;
  }

  .sbs-booking-sidebar {
    display: none;
  }

  .ysp-topbar {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .ysp-view-switch {
    overflow-x: auto;
  }

  .ysp-sheet {
    max-height: 92dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sbs-booking-container *,
  .sbs-portal-wrap *,
  .yatoon-manage-wrap *,
  .yatoon-staff-portal-page *,
  body.yatoon-app-shell-on * {
    scroll-behavior: auto;
    transition-duration: .01ms;
    animation-duration: .01ms;
    animation-iteration-count: 1;
  }
}

/* 4.4.4 unified product polish ------------------------------------------------ */
.sbs-booking-container,
.sbs-portal-wrap,
.yatoon-manage-wrap,
.yatoon-staff-portal-page,
body.yatoon-app-shell-on {
  --y4-radius-control: 10px;
  --y4-radius-card: 16px;
  --y4-accent-soft: color-mix(in srgb, var(--y4-primary) 8%, #fff);
  font-size: 15px;
  line-height: 1.5;
}

/* Booking cards: larger imagery without sacrificing scanability. */
@media (min-width: 641px) {
  .sbs-booking-container .sbs-service-item.ybs-svc-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(156px, 24%, 196px);
    min-height: 176px;
    overflow: hidden;
    border-radius: var(--y4-radius-card) !important;
  }

  .sbs-booking-container .sbs-service-item.ybs-svc-card .ybs-svc-hero {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 176px;
    aspect-ratio: auto;
  }

  .sbs-booking-container .sbs-service-item.ybs-svc-card .sbs-service-layout {
    grid-column: 1;
    grid-row: 1;
    padding: 18px 20px !important;
  }
}

.sbs-booking-container .ybs-svc-hero img {
  object-position: center;
}

.sbs-booking-container .ybs-svc-card-placeholder .ybs-svc-hero {
  background:
    linear-gradient(-135deg, color-mix(in srgb, var(--y4-primary) 8%, #fff), #f8fafc),
    #f8fafc !important;
}

.sbs-booking-container .ybs-svc-hero-fallback {
  position: relative;
  isolation: isolate;
}

.sbs-booking-container .ybs-svc-hero-fallback::before,
.sbs-booking-container .ybs-svc-hero-fallback::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--y4-primary) 18%, transparent);
  border-radius: 999px;
}

.sbs-booking-container .ybs-svc-hero-fallback::before { width: 112px; height: 112px; }
.sbs-booking-container .ybs-svc-hero-fallback::after { width: 148px; height: 148px; opacity: .5; }

.sbs-booking-container .ybs-svc-hero-fallback span {
  width: 58px !important;
  height: 58px !important;
  border: 1px solid color-mix(in srgb, var(--y4-primary) 15%, #fff) !important;
  border-radius: 18px !important;
  color: var(--y4-primary-strong) !important;
  background: rgba(255,255,255,.88) !important;
  box-shadow: var(--y4-shadow-sm) !important;
  font-size: 25px !important;
}

.sbs-booking-container .ybs-svc-popular-overlay {
  color: var(--y4-primary-strong);
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.92);
  box-shadow: var(--y4-shadow-sm);
}

.sbs-booking-container .ybs-svc-pills .ybs-pill {
  color: var(--y4-muted);
  border: 1px solid var(--y4-border);
  background: #f8fafc;
  font-weight: 650;
}

.sbs-booking-container .sbs-service-price-row {
  color: var(--y4-text);
  margin-top: 10px;
}

.sbs-booking-container .sbs-service-price {
  color: var(--y4-primary-strong) !important;
  font-size: 15px;
  font-weight: 780;
}

.sbs-booking-container .sbs-book-btn.ybs-pill-btn {
  min-width: 74px;
  min-height: 38px !important;
  padding-inline: 18px !important;
  border-radius: var(--y4-radius-control) !important;
  font-weight: 750 !important;
}

.sbs-booking-container .ybs-next-opening.is-loaded,
.sbs-booking-container .ybs-next-opening.is-urgent {
  color: var(--y4-muted);
}

.sbs-booking-container .ybs-next-opening-dot,
.sbs-booking-container .ybs-next-opening.is-loaded .ybs-next-opening-dot,
.sbs-booking-container .ybs-next-opening.is-urgent .ybs-next-opening-dot {
  background: var(--y4-primary);
  box-shadow: none;
  animation: none;
}

.sbs-booking-container .sbs-staff-card.selected::after {
  content: "\2713" !important;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: #fff;
  background: var(--y4-primary);
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
}

.sbs-booking-container .sbs-summary-edit-btn {
  color: var(--y4-muted) !important;
  border: 1px solid var(--y4-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.sbs-booking-container .sbs-summary-edit-btn[style*="display:none"] {
  display: none !important;
}

.sbs-booking-container .sbs-summary-remove-service-btn {
  min-height: 28px;
  padding: 4px 8px;
  color: var(--y4-danger) !important;
  border: 1px solid color-mix(in srgb, var(--y4-danger) 28%, var(--y4-border)) !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.sbs-booking-container .sbs-summary-remove-service-btn:hover {
  color: #fff !important;
  border-color: var(--y4-danger) !important;
  background: var(--y4-danger) !important;
}

.sbs-booking-overlay .sbs-gr-remove-svc {
  display: inline-grid !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  place-items: center;
  color: #667085 !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 50% !important;
  background: #fff !important;
  font-size: 24px !important;
  font-weight: 500;
  line-height: 1 !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}

.sbs-booking-overlay .sbs-gr-remove-svc:hover,
.sbs-booking-overlay .sbs-gr-remove-svc:focus-visible {
  color: #b42318 !important;
  border-color: #fda29b !important;
  background: #fff5f4 !important;
}

@media (min-width: 641px) {
  .sbs-booking-container .sbs-service-item:not(.ybs-svc-card) {
    min-height: 174px;
  }

  .sbs-booking-container .sbs-service-item:not(.ybs-svc-card) .sbs-service-content {
    padding: 18px 20px !important;
  }

  .sbs-booking-container .sbs-service-right-col {
    width: 132px !important;
    min-width: 132px !important;
    gap: 10px !important;
    margin-right: 8px !important;
  }

  .sbs-booking-container .sbs-service-img-wrap {
    width: 132px !important;
    height: 112px !important;
    border-radius: 14px !important;
  }

  .sbs-booking-container .sbs-service-right-col .sbs-book-btn {
    width: 132px !important;
    min-width: 132px !important;
    min-height: 40px !important;
    margin-top: 0 !important;
    border-radius: var(--y4-radius-control) !important;
  }
}

.sbs-booking-container .sbs-service-img-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--y4-border);
  background: linear-gradient(-145deg, var(--y4-accent-soft), #f8fafc);
}

.sbs-booking-container .sbs-service-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sbs-booking-container .sbs-service-image-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background:
    radial-gradient(circle at center, transparent 0 34px, color-mix(in srgb, var(--y4-primary) 12%, transparent) 35px 36px, transparent 37px),
    linear-gradient(-145deg, var(--y4-accent-soft), #f8fafc);
}

.sbs-booking-container .sbs-service-image-fallback span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--y4-primary-strong);
  border: 1px solid color-mix(in srgb, var(--y4-primary) 16%, #fff);
  border-radius: 15px;
  background: rgba(255,255,255,.9);
  font-size: 22px;
  font-weight: 800;
  box-shadow: var(--y4-shadow-sm);
}

.sbs-booking-container .sbs-service-popular-label {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  color: var(--y4-primary-strong);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--y4-shadow-sm);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

/* Customer account center. */
.sbs-portal-wrap .sbs-portal-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--y4-border);
  border-radius: 14px;
  background: #f2f4f7;
}

.sbs-portal-wrap .sbs-portal-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
}

.sbs-portal-wrap .sbs-portal-tab.active {
  color: #fff;
  background: var(--y4-primary);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--y4-primary) 20%, transparent);
}

.sbs-portal-wallet {
  padding: 22px;
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-card);
  background: linear-gradient(-145deg, #fff, var(--y4-accent-soft));
}

.sbs-portal-wallet-head,
.sbs-portal-wallet-note,
.sbs-portal-wallet-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sbs-portal-wallet-head h3 { margin: 2px 0 3px; font-size: 24px; }
.sbs-portal-wallet-head p,
.sbs-portal-wallet-note p { margin: 0; color: var(--y4-muted); }
.sbs-portal-wallet-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 15px;
  background: var(--y4-primary);
  font-size: 22px;
  font-weight: 800;
}

.sbs-portal-wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.sbs-portal-wallet-grid > div {
  padding: 14px;
  border: 1px solid var(--y4-border);
  border-radius: 12px;
  background: rgba(255,255,255,.86);
}

.sbs-portal-wallet-grid span,
.sbs-portal-wallet-next span { display: block; color: var(--y4-muted); font-size: 12px; }
.sbs-portal-wallet-grid strong { display: block; margin-top: 4px; font-size: 18px; }
.sbs-portal-wallet-note { justify-content: flex-start; padding: 14px; border-radius: 12px; background: #fff; }
.sbs-portal-wallet-note > span { color: var(--y4-primary); font-size: 18px; font-weight: 800; }
.sbs-portal-wallet-next { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--y4-border); }
.sbs-portal-wallet-next strong { text-align: left; }
.sbs-portal-wallet-cta { display: inline-flex !important; width: auto !important; margin-top: 18px; text-decoration: none !important; }

/* Staff portal: make floor actions unambiguous and thumb-friendly. */
.yatoon-staff-portal-page .ysp-today-metrics > div {
  border: 1px solid var(--y4-border);
  border-radius: 13px;
  background: #fff;
}

.yatoon-staff-portal-page .ysp-today-metrics .attention {
  color: var(--y4-danger);
  border-color: color-mix(in srgb, var(--y4-danger) 25%, var(--y4-border));
  background: color-mix(in srgb, var(--y4-danger) 5%, #fff);
}

.yatoon-staff-portal-page .ysp-detail-actions {
  display: grid;
  gap: 10px;
}

.yatoon-staff-portal-page .ysp-square-row-action {
  min-height: 58px;
  border: 1px solid var(--y4-border);
  border-radius: 12px;
  background: #fff;
}

.yatoon-staff-portal-page .ysp-square-row-action[data-action="arrived"] strong,
.yatoon-staff-portal-page .ysp-square-row-action[data-action="completed"] strong {
  color: var(--y4-primary-strong);
}

.yatoon-staff-portal-page .ysp-square-primary {
  min-height: 48px;
  border-radius: 12px;
  background: var(--y4-primary) !important;
}

/* Admin primitives shared across legacy screens. */
body.yatoon-app-shell-on :is(.postbox,.card,.sbs-card,.yatoon-card,.yc-card,.yatoon-panel,.yatoon-drawer,.yatoon-modal-content) {
  border-radius: var(--y4-radius-card) !important;
}

body.yatoon-app-shell-on :is(.widefat,.wp-list-table) tbody tr:hover {
  background: #f8fafc;
}

body.yatoon-app-shell-on :is(.button,.button-primary,.button-secondary) {
  border-radius: var(--y4-radius-control) !important;
}

body.yatoon-app-shell-on :is(.yatoon-inline-status,.yatoon-inline-success,.yatoon-meta-confirmed) {
  color: var(--y4-success) !important;
  font-weight: 700;
}

body.yatoon-app-shell-on .yatoon-inline-success {
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--y4-success) 22%, var(--y4-border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--y4-success) 7%, #fff);
}

body.yatoon-app-shell-on .yatoon-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .05em; }

@media (max-width: 640px) {
  .sbs-booking-container .ybs-svc-hero { min-height: 148px !important; aspect-ratio: 1.75 / 1 !important; }
  .sbs-booking-container .sbs-service-img-wrap { width: 104px !important; height: 96px !important; border-radius: 14px !important; }
  .sbs-booking-container .sbs-service-right-col { width: 104px !important; min-width: 104px !important; gap: 8px !important; }
  .sbs-booking-container .sbs-service-right-col .sbs-book-btn { width: 104px !important; min-width: 104px !important; min-height: 42px !important; margin-top: 0 !important; }
  .sbs-portal-wallet-grid { grid-template-columns: 1fr; }
  .sbs-portal-wallet { padding: 18px; }
  .sbs-portal-wrap .sbs-portal-tab { padding-inline: 6px; font-size: 12px; }
}

/* Shared admin components: tables, filters, dialogs, actions, and empty states. */
body.yatoon-app-shell-on :where(.wrap,.yatoon-admin-page) .widefat {
  overflow: hidden;
  border: 1px solid var(--y4-border);
  border-radius: var(--y4-radius-sm);
  box-shadow: var(--y4-shadow-sm);
}

body.yatoon-app-shell-on :where(.wrap,.yatoon-admin-page) .widefat thead th {
  padding: 12px 14px;
  color: var(--y4-text-muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .03em;
  text-transform: uppercase;
}

body.yatoon-app-shell-on :where(.wrap,.yatoon-admin-page) .widefat td {
  padding: 13px 14px;
  vertical-align: middle;
}

body.yatoon-app-shell-on :where(.button,button,input,select,textarea,a,[tabindex]):focus-visible {
  outline: 3px solid #2563eb !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

body.yatoon-app-shell-on :where(.button,.button-primary,.button-secondary) {
  min-height: 36px;
  border-radius: var(--y4-radius-control, 10px);
}

body.yatoon-app-shell-on :where(.yatoon-empty-state,.yatoon-empty,.sbs-empty-state) {
  padding: 32px 20px;
  color: var(--y4-text-muted);
  text-align: center;
}

@media (max-width: 782px) {
  body.yatoon-app-shell-on :where(.tablenav,.yatoon-filter-row,.sbs-filter-row) {
    display: flex;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.yatoon-app-shell-on :where(.tablenav,.yatoon-filter-row,.sbs-filter-row) :where(input,select,.button) {
    width: 100%;
    max-width: none;
  }
}

/* 4.4.5: isolate customer-facing typography from WordPress themes. */
.sbs-booking-container :where(h1,h2,h3,h4,h5,h6,button,input,select,textarea),
.sbs-portal-wrap :where(h1,h2,h3,h4,h5,h6,button,input,select,textarea),
.yatoon-manage-wrap :where(h1,h2,h3,h4,h5,h6,button,input,select,textarea) { font-family: var(--y4-font) !important; letter-spacing: normal; }
.sbs-booking-overlay,.sbs-booking-overlay :where(h1,h2,h3,h4,h5,h6,button,input,select,textarea) { font-family: var(--y4-font) !important; letter-spacing: normal; }
.sbs-booking-container :where(.sbs-step-4 > h2,#sbs-main-title) { color: var(--y4-text); font-family: var(--y4-font) !important; font-size: clamp(28px,4vw,42px) !important; font-weight: 780 !important; line-height: 1.1 !important; letter-spacing: -.035em !important; }

#sbs-pending-services-banner { margin: 0 0 18px; padding: 18px; border: 1px solid var(--y4-border); border-radius: var(--y4-radius-card); background: #fff; box-shadow: var(--y4-shadow-sm); }
.sbs-banner-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sbs-banner-heading > div { display: flex; align-items: center; gap: 8px; color: var(--y4-text); }
.sbs-banner-heading strong { font-size: 15px; }
.sbs-banner-heading span:last-child { color: var(--y4-muted); font-size: 12px; font-weight: 650; }
.sbs-banner-check { display: grid !important; width: 22px; height: 22px; place-items: center; color: #fff !important; border-radius: 50%; background: var(--y4-primary); font-size: 12px !important; font-weight: 800; }
.sbs-banner-service-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; padding: 14px 0; border-top: 1px solid var(--y4-border); }
.sbs-banner-service-main { min-width: 0; }
.sbs-banner-service-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--y4-text); font-size: 14px; font-weight: 700; line-height: 1.35; }
.sbs-banner-order { display: inline-grid; width: 21px; height: 21px; place-items: center; margin-left: 2px; color: var(--y4-primary-strong); border-radius: 7px; background: var(--y4-primary-soft); font-size: 11px; font-weight: 800; }
.sbs-banner-service-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 8px; color: var(--y4-muted); font-size: 12px; }
.sbs-banner-service-meta > span { white-space: nowrap; }
.sbs-banner-service-meta > span + span::before { content: "·"; margin-left: 7px; color: var(--y4-border-strong); }
#sbs-pending-services-banner .sbs-inline-staff-sel { width: auto; min-width: 150px; max-width: 100%; min-height: 36px; padding: 6px 10px 6px 32px; color: var(--y4-text); border: 1px solid var(--y4-border-strong); border-radius: 9px; background: #fff; font-size: 12px; cursor: pointer; }
.sbs-banner-service-actions { display: flex; align-items: center; align-self: center; gap: 6px; }
.sbs-banner-service-actions button { min-width: 36px; min-height: 36px; padding: 7px 10px; color: var(--y4-muted); border: 1px solid var(--y4-border); border-radius: 9px; background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.sbs-banner-service-actions button:hover { color: var(--y4-text); border-color: var(--y4-border-strong); background: #f8fafc; }
.sbs-banner-service-actions .sbs-banner-remove-btn { color: var(--y4-danger); }
.sbs-banner-add-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--y4-border); }
.sbs-banner-add-actions .sbs-btn { min-height: 40px; padding: 9px 14px !important; color: var(--y4-primary-strong) !important; border: 1px solid color-mix(in srgb,var(--y4-primary) 35%,var(--y4-border)) !important; border-radius: 10px !important; background: var(--y4-primary-soft) !important; font-size: 12px !important; font-weight: 750 !important; white-space: nowrap; }
.sbs-banner-add-actions #sbs-banner-add-guest { background: #fff !important; }

.sbs-portal-wallet-assets { display: grid; gap: 10px; margin: 16px 0; }
.sbs-portal-wallet-asset { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--y4-border); border-radius: 12px; background: #fff; }
.sbs-portal-wallet-asset strong { display: block; }
.sbs-portal-wallet-asset p { margin: 3px 0 0; color: var(--y4-muted); font-size: 12px; }
.sbs-portal-wallet-asset-value { text-align: left; white-space: nowrap; }
.sbs-portal-wallet-history { margin-top: 18px; }
.sbs-portal-wallet-history h4 { margin: 0 0 10px; }
.sbs-portal-wallet-history-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--y4-border); font-size: 13px; }
.sbs-portal-wallet-history-row span { color: var(--y4-muted); }
.sbs-portal-btn-primary { color: #fff !important; border-color: var(--y4-primary) !important; background: var(--y4-primary) !important; text-decoration: none !important; }
.sbs-portal-rewards { margin: 18px 0; padding: 16px; border: 1px solid var(--y4-border); border-radius: 13px; background: #fff; }
.sbs-portal-rewards h4 { margin: 0 0 8px; }
.sbs-portal-reward-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--y4-border); }
.sbs-portal-reward-row p { margin: 3px 0 0; color: var(--y4-muted); font-size: 12px; }
.sbs-portal-reward-row button[disabled] { opacity: .58; cursor: not-allowed; }
.sbs-portal-reward-message { min-height: 20px; margin: 10px 0 0; font-size: 13px; }
.sbs-portal-reward-message.success,#sbs-profile-message.success { color: var(--y4-success); }
.sbs-portal-reward-message.error,#sbs-profile-message.error { color: var(--y4-danger); }
.sbs-portal-profile { padding: 22px; border: 1px solid var(--y4-border); border-radius: var(--y4-radius-card); background: #fff; }
.sbs-portal-profile h3 { margin: 2px 0 4px; font-size: 24px; }
.sbs-portal-profile-intro { max-width: 680px; margin: 0 0 18px; color: var(--y4-muted); }
.sbs-portal-profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.sbs-portal-profile-grid label > span { display: block; margin: 0 0 6px; color: var(--y4-text); font-size: 12px; font-weight: 750; }
.sbs-portal-profile-wide { grid-column: 1 / -1; }
.sbs-portal-profile textarea { resize: vertical; }
.sbs-portal-profile input[readonly] { color: var(--y4-muted); background: #f8fafc; cursor: not-allowed; }
.sbs-portal-profile-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.sbs-portal-profile-actions .sbs-portal-btn { width: auto; }
.sbs-portal-profile-actions p { margin: 0; }
.sbs-portal-privacy-note { margin-top: 18px; padding: 13px; border-radius: 11px; background: var(--y4-primary-soft); }
.sbs-portal-privacy-note p { margin: 3px 0 0; color: var(--y4-muted); font-size: 12px; }

@media (max-width: 640px) {
  .sbs-portal-wrap .sbs-portal-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sbs-portal-profile-grid { grid-template-columns: 1fr; }
  .sbs-portal-profile-wide { grid-column: auto; }
  #sbs-pending-services-banner { padding: 15px; }
  .sbs-banner-service-row { grid-template-columns: 1fr; }
  .sbs-banner-service-actions { justify-content: flex-end; }
  .sbs-banner-service-actions .sbs-banner-edit-btn,.sbs-banner-service-actions .sbs-banner-remove-btn { flex: 1; }
  .sbs-banner-add-actions { display: grid; }
  .sbs-banner-add-actions .sbs-btn { width: 100%; }
  .sbs-booking-container :where(.sbs-step-4 > h2,#sbs-main-title) { font-size: 30px !important; }
}
