﻿/* ============================================================
   SECTION 1 — FUNCTIONAL / SCENARIO-SPECIFIC FIXES
   These are NOT LinCore visual classes. They exist to work
   around layout/behavior bugs in specific PriceSmart pages.
   Safe to keep — do not remove for "LinCore alignment" work.
   ============================================================ */

#blazor-error-ui {
    z-index: 1500;
}

/* SCENARIO FIX: MudDataGrid header <th> in workflow pages was
   losing its sort-icon/filter overlay due to LinCore.Blazor's
   base overflow rules. Purely functional, no visual intent. */
.mud-data-grid .mud-table-head th {
    position: relative;
    overflow: visible;
}

/* SCENARIO FIX: disabled/inaccessible rows — dims + disables
   pointer events. Functional (accessibility/state), not a
   LinCore look-and-feel class. */
.mud-table-body tr.mud-row-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* SCENARIO FIX: positions inline-edit inputs correctly inside
   MudDataGrid cells. Functional layout fix only. */
.mud-data-grid .mud-input {
    position: relative;
}

/* SCENARIO FIX: removes default MudBlazor list-item padding so
   custom compact popovers/menus lay out correctly. Functional. */
.mud-list-item {
    padding: 0px 0px 0px 0px !important;
}

.mud-list-item-icon {
    min-width: 15px;
    padding: 0px 5px 0px 5px;
}

/* SCENARIO FIX: required-field indicator color. Semantic
   (validation state), not a brand look-and-feel choice, so it
   intentionally does not follow LinCore's palette tokens. */
.mud-input-required {
    color: red !important;
}

/* Required field asterisk - MudBlazor v8 */
.mud-input-control.mud-input-required > .mud-input-control-input-container > .mud-input-label::after {
    color: red !important;
}

/* ============================================================
   SECTION 2 — LOOK & FEEL (MUST FOLLOW LINCORE STANDARD)
   Font, color, and background rules below duplicate/override
   LinCore's own typography and theme. LinCore already applies
   `font-family: LindeDax` globally via LindeCore.css on <body>,
   so most of these !important overrides are redundant and risk
   drifting from LinCore whenever the base font/theme changes.
   Prefer removing custom font-family/color values here and let
   LinCore's base styles cascade instead.
   ============================================================ */

.mud-icon-size-medium {
    font-size: 1.25rem;
}

/* CLEANED: font-family removed — LinCore already sets
   `font-family: LindeDax` globally on <body> via LindeCore.css.
   Only the compact font-size is kept (density, not branding). */
.mud-list-item-text p {
    font-size: 14px !important;
}

/* CLEANED: font-family removed — inherits from LinCore's body rule. */
.mud-popover p {
    font-size: 14px !important;
    padding-left: 5px;
}

/* CLEANED: font-family removed — inherits from LinCore's body rule.
   Sizes/colors kept as PriceSmart-specific utility classes. */
.small-title {
    font-size: 14px !important;
    margin: 5px 2px;
    background-color: #e0e0e0;
    font-weight: bold;
}
.meduim-title {
    font-size: 20px !important;
    margin: 5px 2px;
    background-color: #e0e0e0;
    font-weight: bolder;
}
.center-meduim-title {
    font-size: 20px !important;
    text-align: center;
}

/* CLEANED: font-family removed — inherits from LinCore's body rule. */
.mud-dialog-title{
    padding: 4px 20px !important;
}

/* LOOK: LinCore's dialog host hardcodes "max-height: 500px; overflow-y: scroll"
   inline on the MudContainer inside .mud-dialog-content, which caps full-screen
   dialogs at 500px and gives them a second inner scrollbar. LinDialogOptions
   exposes no setting for it, so the inline style is overridden here and the
   dialog content scrolls naturally instead. */
.mud-dialog-fullscreen .mud-dialog-content > .mud-container {
    max-height: none !important;
    overflow-y: visible !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* LOOK: PriceSmart-only card/section chrome. Not a LinCore
   class, colors are app-specific branding — leave as-is, but
   confirm border/background match LinCore's card tokens if one
   exists (e.g. LinCard) before introducing new custom cards. */
.section-container {
    border: 1px solid #e0e0e0;
    padding: 0px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.section-container:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* SCENARIO/LAYOUT: flex utility sharing the same PriceSmart
   header-bar gray as the table header and .headerbar below —
   intentional, single shared color across the app. */
.dflex {
    display: flex;
    background-color: rgb(224 224 224) !important;
}

/* SCENARIO: generic flex utilities, no look/color content. */
.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

/* SCENARIO: validation message color is semantic (error state),
   consistent with .mud-input-required above — keep as-is. */
.validation-message{
    padding: 2px !important;
    color : red !important;
}

/* LOOK: PriceSmart brand card border color (#005591 = Linde
   blue). If LinCore exposes a primary-color CSS variable this
   should reference that instead of a hardcoded hex value. */
.pricesmart-card {
    border: 1px solid #005591;
    border-radius: 5px;
    padding: 5px;
    margin: 10px 0px;
}

/* LOOK: PriceSmart-only header bar gray — intentional design
   decision, same rgb(224 224 224) value as the table header
   and .dflex above. Single shared color, update all three
   together if this ever changes. */
.headerbar {
    background-color: rgb(224 224 224) !important;
    margin: 0px 5px;
}

/* CLEANED: font-family removed — inherits from LinCore's body rule. */
.message-info {
    font-size: 16px !important;
    text-align: left;
    margin-top:16px;
}

/* SCENARIO: layout-only utility for right-aligned action bars.
   Background color is incidental, not brand-critical. */
.right-aling-div {
    width: 100%;
    padding: 1px;
    background-color: #f0f0f0;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* SCENARIO: fixed footer showing app version — functional,
   muted color chosen intentionally to de-emphasize, not tied
   to LinCore theme. */
.app-version-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    font-size: 0.7rem;
    color: #888;
    z-index: 9999;
}

/* ============================================================
   SECTION 3 — TABLE DENSITY (FUNCTIONAL — SAFE TO KEEP)
   Padding/font-size/line-height here replicate LinDataGrid's
   own "UseCompactCells" behavior (LinCore's scoped CSS applies
   the equivalent via `.mud-table-small-cell` under
   `[linde-core-component]`). This is a structural/density
   choice, not a color/branding one, so it is fine to keep
   app-wide as long as it only affects sizing — see below for
   the parts that must instead defer to LinCore's own theme.
   ============================================================ */

/* --- Header cells (MudTable + MudDataGrid) — FUNCTIONAL (density) + INTENTIONAL LOOK
   DECISION: PriceSmart deliberately uses a gray header band across
   ALL tables/grids app-wide (product requirement, not a LinCore
   mismatch). Uses the same rgb(224 224 224) as .headerbar so there
   is a single gray value shared across the app — update both
   places together if the design ever changes. */
.mud-table-head .mud-table-cell {
    padding: 2px 0px 2px 8px !important;
    background-color: rgb(224 224 224) !important;
    font-size: 0.8125rem;
    line-height: 1.2;
}

/* --- Body cells (MudTable + MudDataGrid) — FUNCTIONAL (density only) --- */
.mud-table-body .mud-table-row .mud-table-cell {
    padding: 2px 0px 2px 8px !important;
    font-size: 0.8125rem;
    line-height: 1.2;
}

/* --- Footer / pager cells — FUNCTIONAL (density only) --- */
.mud-table-foot .mud-table-cell {
    padding: 2px 0px 2px 8px !important;
    font-size: 0.8125rem;
    line-height: 1.2;
}

/* --- MudSimpleTable header cells (raw <th>) — FUNCTIONAL (density) + INTENTIONAL LOOK
   DECISION: same gray header band as above, applied to raw <th>
   tables (MudSimpleTable) so all table styles stay consistent. */
.mud-table th {
    padding: 2px 0px 2px 8px !important;
    background-color: rgb(224 224 224) !important;
    font-size: 0.8125rem;
    line-height: 1.2;
    vertical-align: middle;
}

/* --- MudSimpleTable body cells (raw <td>) — FUNCTIONAL (density only) --- */
.mud-table td {
    padding: 2px 0px 2px 8px !important;
    font-size: 0.8125rem;
    line-height: 1.2;
    vertical-align: middle;
}

/* --- Inline-editable table input controls (compact) — FUNCTIONAL --- */
.mud-table .mud-input-control {
    margin-top: 0;
    padding-top: 0;
}

.mud-table .mud-input-control .mud-input.mud-input-text {
    margin-top: 0;
}

.mud-table .mud-input-slot,
.mud-table .mud-input-root {
    padding-top: 2px;
    padding-bottom: 2px;
    min-height: 0;
}

/* Shrink the up/down spinner buttons (e.g. LinNumericField). */
.mud-table .mud-input-adornment .mud-icon-button {
    padding: 0;
    height: 14px;
    width: 18px;
}

.mud-table .mud-input-adornment .mud-icon-button .mud-icon-root {
    font-size: 0.95rem;
}

/* Compact checkbox inside table cells — FUNCTIONAL (density only). */
.mud-table .mud-checkbox {
    margin: 0;
}

.mud-table .mud-checkbox .mud-icon-button {
    padding: 2px;
}

/* --- Toolbar compact — FUNCTIONAL (density only) --- */
.mud-table-toolbar {
    height: auto;
    min-height: 0;
    padding: 4px 8px;
}

/* --- Table container scroll — FUNCTIONAL (layout only) --- */
.mud-table-container {
    overflow-x: auto;
}

/* SCENARIO: Toolbar action buttons container — layout only */
.toolbar-actions {
    display: flex;
    gap: 4px;
}

.toolbar-actions-top {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

/* SCENARIO: Column config popover width — layout only */
.column-config-popover {
    min-width: 220px;
}

/* SCENARIO: MultiSelectAutocomplete overflow chip — layout only */
.chip-cursor-pointer {
    cursor: pointer;
}

/* SCENARIO: MultiSelectAutocomplete overflow popover — layout only */
.overflow-popover {
    display: inline-block;
    max-width: 400px;
}
.lin-main-content:has(.home-dashboard) {
    padding: 1.5rem;
}

.mud-tooltip:has(.model-execution-tooltip-table) {
    padding: 0;
    background: transparent;
}

.mud-tooltip.model-execution-arrow-adjusted::after {
    left: var(--model-execution-arrow-left);
}
