/* Reserve space inside the existing Old grid without changing its frame structure. */
#salon-center-page-body-id:has(> [data-sc2-legend]) {
    box-sizing: border-box;
    padding-bottom: 42px;
}
#salon-center-page-body-id:has(> [data-sc2-legend][data-open="false"]) {
    padding-bottom: 0;
}
#salon-center-page-body-id:has(> [data-sc2-legend]) > .column-gap {
    min-height: 0;
}
#salon-center-page-body-id > aside.sc2-legend {
    --sc2-frame-border: var(--pos-border, #d5ddd8);
    --sc2-frame-bg: var(--pos-surface, #fff);
    --sc2-muted: var(--pos-muted, #586571);
    --sc2-header-fg: var(--pos-text, #263238);
    --sc2-primary: var(--main-color, #3a9821);
    --sc2-tix-walkin: var(--pos-walkIn-color, #9864c8);
    --sc2-tix-appt: var(--pos-appointment-color, #0e8b91);
    --sc2-tix-inservice: var(--pos-inservice-color, #0284c7);
    --sc2-tix-done: var(--pos-pending-color, #b45309);
    --sc2-safe-left: env(safe-area-inset-left, 0px);
    --sc2-safe-right: env(safe-area-inset-right, 0px);
    --sc2-safe-bottom: env(safe-area-inset-bottom, 0px);
    position: absolute;
    bottom: 0;
    left: 0;
    min-width: 0;
    box-sizing: border-box;
    font-family: Sora, sans-serif;
}
#salon-center-page-body-id .sc2-legend *,
#salon-center-page-body-id .sc2-legend *::before,
#salon-center-page-body-id .sc2-legend *::after {
    box-sizing: border-box;
}
@media (max-width: 768px) {
    #salon-center-page-body-id:has(> [data-sc2-legend][data-open="true"]) {
        padding-bottom: 38px;
    }
}

/* Legend presentation from VIP. */
#salon-center-page-body-id .sc2-legend {
   --sc2-legend-fade-start: 0px;
   --sc2-legend-fade-end: 0px;
   position: relative;
   z-index: 31;
   display: flex;
   flex: 0 0 auto;
   align-items: center;
   gap: 12px;
   width: 100%;
   min-height: 42px;
   padding: 0 max(12px, var(--sc2-safe-right)) 0 max(12px, var(--sc2-safe-left));
   border-top: 1px solid var(--sc2-frame-border);
   background: var(--sc2-frame-bg);
   color: var(--sc2-muted);
   font-size: 11px;
   font-weight: 500;
   line-height: 18px;
}

#salon-center-page-body-id .sc2-legend[data-open="false"] {
   min-height: 0;
   height: 0;
   border: 0;
}

#salon-center-page-body-id .sc2-legend__toggle {
   display: inline-grid;
   flex: none;
   place-items: center;
   width: 28px;
   height: 28px;
   padding: 0;
   border: 1px solid transparent;
   border-radius: 50%;
   background: color-mix(in srgb, var(--sc2-muted) 8%, var(--sc2-frame-bg));
   color: var(--sc2-header-fg);
   font-size: 16px;
   cursor: pointer;
}

#salon-center-page-body-id .sc2-legend__toggle:hover {
   background: color-mix(in srgb, var(--sc2-muted) 16%, var(--sc2-frame-bg));
}

#salon-center-page-body-id .sc2-legend[data-open="false"] .sc2-legend__toggle {
   position: absolute;
   left: max(12px, var(--sc2-safe-left));
   bottom: max(8px, var(--sc2-safe-bottom));
   border-color: var(--sc2-frame-border);
   background: var(--sc2-frame-bg);
   box-shadow: 0 2px 8px #0002;
}

#salon-center-page-body-id .sc2-legend__track {
   display: flex;
   flex: 1 1 auto;
   align-items: center;
   gap: 24px;
   min-width: 0;
   padding: 10px 0;
   overflow-x: auto;
   overscroll-behavior-x: contain;
   scrollbar-width: none;
   mask-image: linear-gradient(to right, transparent, #000 var(--sc2-legend-fade-start),
      #000 calc(100% - var(--sc2-legend-fade-end)), transparent);
}

#salon-center-page-body-id .sc2-legend__track::-webkit-scrollbar { display: none; }
#salon-center-page-body-id .sc2-legend__track[hidden] { display: none; }
#salon-center-page-body-id .sc2-legend.fade-start { --sc2-legend-fade-start: 20px; }
#salon-center-page-body-id .sc2-legend.fade-end { --sc2-legend-fade-end: 20px; }

#salon-center-page-body-id .sc2-legend__group,
#salon-center-page-body-id .sc2-legend__item {
   display: inline-flex;
   flex: none;
   align-items: center;
   white-space: nowrap;
}

#salon-center-page-body-id .sc2-legend__group { gap: 12px; }
#salon-center-page-body-id .sc2-legend__item { gap: 6px; }
#salon-center-page-body-id .sc2-legend__group + .sc2-legend__group {
   padding-left: 24px;
   border-left: 1px solid var(--sc2-frame-border);
}
#salon-center-page-body-id .sc2-legend__label { font-size: 10px; font-weight: 600; text-transform: uppercase; }

#salon-center-page-body-id .sc2-legend__frame {
   width: 16px;
   height: 10px;
   border: 1.5px solid;
   border-radius: 3px;
}
#salon-center-page-body-id .sc2-legend__frame--walkin { border-color: var(--sc2-tix-walkin); }
#salon-center-page-body-id .sc2-legend__frame--appt { border-color: var(--sc2-tix-appt); }
#salon-center-page-body-id .sc2-legend__frame--inservice { border-color: var(--sc2-tix-inservice); }
#salon-center-page-body-id .sc2-legend__frame--pending { border-color: var(--sc2-tix-done); }
#salon-center-page-body-id .sc2-legend__updated,
#salon-center-page-body-id .sc2-legend__past {
   padding: 0 4px;
   border-radius: 3px;
   background: #6b7280;
   color: #fff;
}
#salon-center-page-body-id .sc2-legend__updated { background: #03a2e2; }
#salon-center-page-body-id .sc2-legend__dot { width: 8px; height: 8px; border-radius: 50%; }
#salon-center-page-body-id .sc2-legend__dot--ready { background: var(--pos-confirmed-solid-fill, #059669); }
#salon-center-page-body-id .sc2-legend__dot--busy { background: #e11d48; }
#salon-center-page-body-id .sc2-legend__dot--out { background: #6b7280; }
#salon-center-page-body-id .sc2-legend__progress {
   width: 22px;
   height: 5px;
   border-radius: 99px;
   background: linear-gradient(to right, #16a34a 60%, #eef1f5 60%);
}
#salon-center-page-body-id .sc2-legend__overdue { color: #dc2626; font-size: 10px; font-weight: 700; }
#salon-center-page-body-id .sc2-legend__icon,
#salon-center-page-body-id .sc2-legend__item > i {
   --sc2-legend-icon-color: var(--pos-primary-text, var(--sc2-primary));
   display: inline-flex;
   flex: none;
   align-items: center;
   justify-content: center;
   width: 18px;
   height: 18px;
   border-radius: 50%;
   color: var(--sc2-legend-icon-color);
   background: color-mix(in srgb, var(--sc2-legend-icon-color) 14%, var(--sc2-frame-bg));
   box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc2-legend-icon-color) 18%, transparent);
   font-size: 11px;
   line-height: 1;
   font-style: normal;
}
#salon-center-page-body-id .sc2-legend__icon > i { color: inherit; }
#salon-center-page-body-id .sc2-legend__icon--request,
#salon-center-page-body-id .sc2-legend__item > .fa-heart { --sc2-legend-icon-color: #e11d48; }
#salon-center-page-body-id .sc2-legend__icon--group,
#salon-center-page-body-id .sc2-legend__icon--combine,
#salon-center-page-body-id .sc2-legend__item > .fa-users,
#salon-center-page-body-id .sc2-legend__item > .fa-layer-group {
   --sc2-legend-icon-color: #7c3aed;
   background: #f3e8ff;
}
#salon-center-page-body-id .sc2-legend__icon--chair,
#salon-center-page-body-id .sc2-legend__item > .fa-chair {
   --sc2-legend-icon-color: #475569;
   border: 1px dashed #cbd5e1;
   background: #fff;
   box-shadow: none;
}
#salon-center-page-body-id .sc2-legend__icon--partial,
#salon-center-page-body-id .sc2-legend__item > .fa-circle-dollar {
   --sc2-legend-icon-color: var(--pos-primary-text, #16a34a);
}
#salon-center-page-body-id .sc2-legend__icon--payment,
#salon-center-page-body-id .sc2-legend__item > .fa-credit-card {
   --sc2-legend-icon-color: var(--pos-primary-ink, #fff);
   background: var(--pos-primary, var(--sc2-primary));
}



@media (max-width: 768px) {
   #salon-center-page-body-id .sc2-legend { min-height: 38px; gap: 8px; }
   #salon-center-page-body-id .sc2-legend__track { padding: 8px 0; }
   #salon-center-page-body-id .sc2-legend__toggle { width: 32px; height: 32px; }
}
