.mud-tabs.mud-elevation-1{
    box-shadow: var(--fg-shadow-box);
}

/* UIAUDIT-6: !important обоснован — переопределение стилей MudBlazor Tabs */
.mud-tabs.mud-tabs-rounded-top .mud-tabs-tabbar {
    background-color: unset !important;
}

.mud-tabs-tabbar .mud-tooltip-root.mud-tooltip-inline {
    background-color: var(--mud-palette-surface);
    border-radius: 30px 30px 0 0 !important;
}

.mud-tabs-tabbar .mud-tab {
    background-color: var(--mud-palette-surface);
    border-radius: 30px 30px 0 0 !important;
}

.mud-tabs-tabbar .mud-tab:hover {
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-secondary);
}

.mud-tabs-tabbar .mud-tab-active {
    background-color: var(--mud-palette-secondary);
    color: var(--mud-palette-primary-text);
}

.tab-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    margin-left: 8px;
    background-color: var(--mud-palette-secondary);
    color: white;
    box-sizing: border-box;
}

.mud-tab-active .tab-count-badge {
    background-color: white;
    color: var(--mud-palette-secondary);
}

/* Country sub-tabs (chips) for Cargo/Farms */
.country-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.country-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 2px solid var(--mud-palette-secondary);
    background: transparent;
    color: var(--mud-palette-text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.country-chip:hover {
    background-color: rgba(var(--mud-palette-secondary-rgb, 103, 58, 183), 0.1);
}

.country-chip.active {
    background-color: var(--mud-palette-secondary);
    color: white;
}

.country-chip .country-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    background-color: var(--mud-palette-secondary);
    color: white;
}

.country-chip.active .country-badge {
    background-color: white;
    color: var(--mud-palette-secondary);
}

/* ================================================================
   Parent tabs (fg-parent-tabs): text-only, no background
   Active: #542A80, Inactive: #A881D3, 20px, uppercase
   ================================================================ */
.fg-parent-tabs .mud-tabs-tabbar .mud-tab,
.fg-parent-tabs .mud-tabs-tabbar .mud-tooltip-root.mud-tooltip-inline {
    background-color: transparent !important;
    border-radius: 0 !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    text-transform: uppercase;
    color: #A881D3;
    padding: 8px 16px;
    min-height: unset;
}

.fg-parent-tabs .mud-tabs-tabbar .mud-tab:hover {
    background-color: transparent !important;
    color: #7B3FB5;
}

.fg-parent-tabs .mud-tabs-tabbar .mud-tab-active {
    background-color: transparent !important;
    color: #542A80 !important;
}

.fg-parent-tabs .mud-tabs-tabbar .mud-tab-active .d-flex {
    color: #542A80;
}

.fg-parent-tabs .mud-tabs-tabbar .mud-tab:not(.mud-tab-active) .d-flex {
    color: #A881D3;
}

.fg-parent-tabs .mud-tabs-tabbar {
    background-color: transparent !important;
    box-shadow: none !important;
}

.fg-parent-tabs .mud-tabs-slider {
    background-color: #542A80 !important;
}

/* ================================================================
   Child tabs (fg-child-tabs): nested tabs inside parent tab panels.
   Standard rounded-top style with secondary color — overrides
   fg-parent-tabs cascade from parent wrapper.
   ================================================================ */
.fg-child-tabs .mud-tabs-tabbar {
    background-color: unset !important;
    box-shadow: none !important;
}

.fg-child-tabs .mud-tabs-tabbar .mud-tab,
.fg-child-tabs .mud-tabs-tabbar .mud-tooltip-root.mud-tooltip-inline {
    background-color: var(--mud-palette-surface) !important;
    border-radius: 30px 30px 0 0 !important;
    font-size: unset !important;
    font-weight: unset !important;
    color: unset !important;
    text-transform: uppercase !important;
    padding: 8px 16px;
    min-height: unset;
}

.fg-child-tabs .mud-tabs-tabbar .mud-tab:hover {
    background-color: var(--mud-palette-surface) !important;
    color: var(--mud-palette-secondary) !important;
}

.fg-child-tabs .mud-tabs-tabbar .mud-tab-active,
.fg-child-tabs .mud-tabs-tabbar .mud-tab-active:hover {
    background-color: var(--mud-palette-secondary) !important;
    color: #FFFFFF !important;
    font-weight: unset !important;
}

.fg-child-tabs .mud-tabs-tabbar .mud-tab-active .d-flex,
.fg-child-tabs .mud-tabs-tabbar .mud-tab-active .d-flex *:not(.tab-count-badge) {
    color: #FFFFFF !important;
}

/* Badge inside child tabs — inactive: purple bg + white text */
.fg-child-tabs .tab-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    margin-left: 8px;
    background-color: var(--mud-palette-secondary) !important;
    color: white !important;
    box-sizing: border-box;
}

/* Badge inside child tabs — active: white bg + purple text */
.fg-child-tabs .mud-tab-active .tab-count-badge {
    background-color: white !important;
    color: var(--mud-palette-secondary) !important;
}

/* Show slider for child tabs (standard style) */
.fg-child-tabs .mud-tabs-slider {
    display: block !important;
}
