/* FoodServe Admin Syncfusion integration and overrides.

   This is the boundary between FoodServe's design system and Syncfusion's generated
   markup. Keep selectors narrowly scoped and use !important only where the vendor
   cascade cannot otherwise be overridden. Ordinary FoodServe components belong in
   components.css, not here. */

/* Force Syncfusion controls to use Roboto text fonts */
.e-control,
.e-control input,
.e-control textarea,
.e-control select,
.e-control button,
.e-control .e-input,
.e-control .e-float-text,
.e-control .e-list-text,
.e-control .e-dlg-header-content,
.e-control .e-dlg-content,
.e-control .e-headertext,
.e-control .e-rowcell,
.e-css,
.e-css input,
.e-css textarea,
.e-css button {
    font-family: var(--ff-body) !important;
}

/* Explicit application buttons use the shared .fs-btn contract.
   Syncfusion's internal buttons retain their component-specific appearance. */
.e-btn.fs-btn {
    border-radius: var(--fs-radius-md);
    box-shadow: none;
    line-height: normal;
    text-transform: none;
}

/* Syncfusion's primary hover selector is more specific than the base button
   contract, so explicit FoodServe primary buttons retain the brand colour. */
.e-css.e-btn.fs-btn.fs-btn--primary:hover,
.e-css.e-btn.fs-btn.fs-btn--primary:focus-visible,
.e-btn.fs-btn.fs-btn--primary:hover,
.e-btn.fs-btn.fs-btn--primary:focus-visible {
    border-color: var(--fs-color-brand) !important;
    background: var(--fs-color-brand) !important;
    color: var(--fs-color-surface) !important;
}

@supports (-webkit-touch-callout: none) {
    /* iOS zooms the viewport when a focused control is smaller than 16px. Enforce
       the safe size on editable controls without increasing desktop typography. */
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    textarea,
    select,
    .e-control input,
    .e-control textarea,
    .e-control select,
    .e-css input,
    .e-css textarea,
    .e-css select {
        font-size: 16px !important;
    }
}

/* Grid toolbar positioning
   Syncfusion renders the toolbar/search within nested positioned elements. These
   rules keep the search affordance anchored consistently across Admin data grids. */
.e-grid .e-toolbar {
    position: relative;
}

.e-grid .e-toolbar .e-toolbar-items {
    background: var(--fs-color-chrome) !important;
    position: absolute !important;
    left: 5px !important;
}

.e-grid .e-toolbar .e-toolbar-items .e-toolbar-left .e-toolbar-item:first-child,
.e-grid .e-toolbar .e-toolbar-items:not(.e-tbar-pos):not(.e-toolbar-multirow) .e-toolbar-item:first-child {
    position: absolute !important;
    left: 5px !important;
}

/* Syncfusion supplies the clear behavior; keep its icon exposed on every viewport. */
.e-grid .e-toolbar .e-search-wrapper .e-clear-icon,
.e-grid .e-toolbar .e-search .e-clear-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    min-width: 1.75rem;
    min-height: 1.75rem;
    opacity: 1 !important;
}
