/* ======================================================================== *
 * Copyright 2026 HCL America Inc.                                          *
 * Licensed under the Apache License, Version 2.0 (the "License");          *
 * you may not use this file except in compliance with the License.         *
 * You may obtain a copy of the License at                                  *
 *                                                                          *
 * http://www.apache.org/licenses/LICENSE-2.0                               *
 *                                                                          *
 * Unless required by applicable law or agreed to in writing, software      *
 * distributed under the License is distributed on an "AS IS" BASIS,        *
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
 * See the License for the specific language governing permissions and      *
 * limitations under the License.                                           *
 * ======================================================================== */

 @mixin enchanted-toggle-button-group-base-styles {
    display: inline-flex;

    &::part(toggle-button-group-container) {
        display: inline-flex;
    }

    &::part(toggle-button-group-slot) {
        display: inline-flex;
        gap: 0px;
        line-height: 0;
    }

    &[orientation='horizontal']::part(toggle-button-group-slot) {
        flex-direction: row;
    }

    &[orientation='vertical']::part(toggle-button-group-slot) {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Increase z-index on focus to layer focused button above neighbors */
    & enchanted-toggle-button:focus-within {
        z-index: 1;
    }

    & enchanted-toggle-button[firstType]:not([lastType])[disabled]::part(toggle-single-button),
    & enchanted-toggle-button[lastType][firstType][disabled]::part(toggle-single-button) {
        border-right-color: transparent;
    }
}