/* ── Standard tab strips ────────────────────────────────────────────────────
   ONE tab language for every MudTabs in the platform. Before this file each page
   invented its own chrome (borderless labels on the email screens, MudBlazor's
   default underline elsewhere) and the flat ones did not read as clickable.

   Horizontal strips read as tabs: a tinted bar with a hairline along its bottom
   edge, sentence-case tabs with rounded tops, a hover tint that says "clickable",
   and an active tab filled with the panel surface, outlined, topped by a primary
   accent so the current tab is unmistakable.

   The hairline is an inset shadow on .mud-tabs-tabbar-inner rather than a border:
   the opaque active tab paints over it, so the selected tab joins its panel with
   no seam, and nothing depends on negative margins (the inner clips overflow).

   Vertical strips keep MudBlazor's sliding indicator and get matching typography
   plus an active highlight — the horizontal chrome must never leak onto them.

   Page styles must not re-declare tab chrome — pass layout only (flex, panel fill). */

/* Shared metrics. Every custom strip in the platform reads them too — the App Builder
   workspace tabs (.oc-tab), the ServiceNow editor tabs (.sn-tab), Media Studio's module
   switcher (.ms-module) and right rail (.ms-rtab), and the Integration Hub switcher
   (.ih-tab) — so all tab strips stay dimensionally identical. */
:root {
    --oc-tab-height: calc(36px * var(--mudc-component-scale, 1));
    --oc-tab-radius: 7px;
    --oc-tab-pad-x: 16px;
    --oc-tab-weight: 600;
}

/* ── Horizontal strips ─────────────────────────────────────────────────── */
.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) {
    flex: 0 0 auto;
    min-height: 0;
    padding: 6px 8px 0;
    border: 0;
    border-radius: 0;
    background-color: color-mix(in srgb, var(--mud-palette-text-primary) 5%, var(--mud-palette-surface));
    box-shadow: none;
}

.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) .mud-tabs-tabbar-inner {
    min-height: 0;
    border: 0;
    background: transparent;
    /* Hairline under the strip; the opaque active tab covers it. */
    box-shadow: inset 0 -1px 0 0 var(--mud-palette-lines-default);
}

.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) .mud-tabs-tabbar-wrapper {
    gap: 3px;
}

.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) .mud-tab {
    /* MudBlazor ships .mud-tab { width: 100% }, which stretches every tab across the bar. */
    width: auto;
    flex: 0 0 auto;
    min-width: 0;
    min-height: var(--oc-tab-height);
    padding: 0 var(--oc-tab-pad-x);
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: var(--oc-tab-radius) var(--oc-tab-radius) 0 0;
    background-color: transparent;
    color: var(--mud-palette-text-secondary);
    font-size: calc(0.8125rem * var(--mudc-text-scale, 1));
    font-weight: var(--oc-tab-weight);
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) .mud-tab:hover {
    color: var(--mud-palette-text-primary);
    background-color: color-mix(in srgb, var(--mud-palette-text-primary) 9%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-text-primary) 14%, transparent);
    border-bottom: 0;
}

.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) .mud-tab.mud-tab-active,
.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) .mud-tab.mud-tab-active:hover {
    color: var(--mud-palette-text-primary);
    background-color: var(--mud-palette-surface);
    border-color: var(--mud-palette-lines-default);
    border-bottom: 0;
}

.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) .mud-tab:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

/* The active tab's fill and accent are the indicator; MudBlazor's sliding
   underline would double it. */
.mud-tabs-tabbar:not(.mud-tabs-vertical):not(.mud-tabs-vertical-reverse) .mud-tab-slider {
    display: none;
}

/* ── Vertical strips ───────────────────────────────────────────────────── */
.mud-tabs-tabbar.mud-tabs-vertical .mud-tab,
.mud-tabs-tabbar.mud-tabs-vertical-reverse .mud-tab {
    min-height: 40px;
    padding: 8px 14px;
    color: var(--mud-palette-text-secondary);
    font-size: calc(0.8125rem * var(--mudc-text-scale, 1));
    letter-spacing: 0;
    text-transform: none;
}

.mud-tabs-tabbar.mud-tabs-vertical .mud-tab.mud-tab-active,
.mud-tabs-tabbar.mud-tabs-vertical-reverse .mud-tab.mud-tab-active {
    color: var(--mud-palette-text-primary);
    background-color: color-mix(in srgb, var(--mud-palette-text-primary) 6%, transparent);
}

.mud-tabs-tabbar.mud-tabs-vertical .mud-tab.mud-tab-active:hover,
.mud-tabs-tabbar.mud-tabs-vertical-reverse .mud-tab.mud-tab-active:hover {
    background-color: color-mix(in srgb, var(--mud-palette-text-primary) 10%, transparent);
}
