/*!
Copyright 2023 Adobe. All rights reserved.
This file is licensed to you 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 REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

.spectrum-SplitButton{
  --spectrum-splitbutton-trigger-border-left:0;
  --spectrum-splitbutton-trigger-min-width:0;
  --spectrum-spltibutton-margin-left:0;
  --spectrum-splitbutton-icon-gap:var(--spectrum-global-dimension-size-150);

  --spectrum-splitbutton-border-radius-edge:var(
    --spectrum-alias-border-radius-small
  );
}

[dir="rtl"] .spectrum-SplitButton,[dir="rtl"]  .spectrum-SplitButton{
		--spectrum-logical-rotation:matrix(-1, 0, 0, 1, 0, 0);
	}

[dir="rtl"] .spectrum-SplitButton, .spectrum-SplitButton:dir(rtl){
		--spectrum-logical-rotation:matrix(-1, 0, 0, 1, 0, 0);
	}

.spectrum-SplitButton .spectrum-SplitButton-trigger{
    --spectrum-splitbutton-trigger-round-edge-padding:var(--spectrum-global-dimension-size-125);
    --spectrum-splitbutton-trigger-flat-edge-padding:var(--spectrum-global-dimension-size-100);

    --spectrum-splitbutton-cta-trigger-flat-edge-padding:calc(var(--spectrum-splitbutton-trigger-flat-edge-padding) - var(--spectrum-button-m-primary-outline-texticon-border-size));
  }

.spectrum-SplitButton .spectrum-SplitButton-action{
    --spectrum-splitbutton-flat-edge-padding:calc(
      var(--spectrum-button-m-primary-outline-texticon-padding-left) -
      var(--spectrum-button-m-primary-outline-texticon-border-size) * 2
    );

    --spectrum-splitbutton-round-edge-padding:var(--spectrum-button-m-primary-outline-texticon-padding-right);

    --spectrum-splitbutton-cta-flat-edge-padding:calc(
      var(--spectrum-button-m-primary-outline-texticon-padding-left) -
      var(--spectrum-button-m-primary-outline-texticon-border-size) * 3
    );
  }

.spectrum-SplitButton{
  position:relative;
  display:inline-flex;
  flex-direction:row;
  vertical-align:top;
}

.spectrum-SplitButton .spectrum-SplitButton-action{
    margin-inline-start:0;

    border-start-start-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
    border-start-end-radius:0;
    border-end-end-radius:0;
    border-end-start-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);

    padding-inline-end:var(--spectrum-splitbutton-flat-edge-padding);
    padding-inline-start:var(--spectrum-splitbutton-round-edge-padding);
  }

.spectrum-SplitButton .spectrum-SplitButton-action.spectrum-Button--accent{
      padding-inline-end:var(--spectrum-splitbutton-cta-flat-edge-padding);
      margin-inline-end:var(--spectrum-button-m-primary-outline-texticon-border-size);
    }

.spectrum-SplitButton .spectrum-SplitButton-action::after{
      border-start-end-radius:var(--spectrum-splitbutton-border-radius-edge);
      border-end-end-radius:var(--spectrum-splitbutton-border-radius-edge);
    }

.spectrum-SplitButton .spectrum-SplitButton-trigger{
    margin-inline-start:0;

    border-start-start-radius:0;
    border-start-end-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
    border-end-end-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
    border-end-start-radius:0;
    border-inline-start-width:var(--spectrum-splitbutton-trigger-border-left);

    padding-inline-start:var(--spectrum-splitbutton-trigger-flat-edge-padding);
    padding-inline-end:var(--spectrum-splitbutton-trigger-round-edge-padding);

    min-inline-size:var(--spectrum-splitbutton-trigger-min-width);
  }

.spectrum-SplitButton .spectrum-SplitButton-trigger.spectrum-Button--accent{
      padding-inline-start:var(--spectrum-splitbutton-cta-trigger-flat-edge-padding);
      border-inline-start-width:var(--spectrum-button-m-primary-outline-texticon-border-size);
    }

.spectrum-SplitButton .spectrum-SplitButton-trigger:focus-visible,
.spectrum-SplitButton .spectrum-SplitButton-trigger.is-focus-visible{
      box-shadow:none;
    }

.spectrum-SplitButton .spectrum-SplitButton-trigger::after{
      border-start-start-radius:var(--spectrum-splitbutton-border-radius-edge);
      border-end-start-radius:var(--spectrum-splitbutton-border-radius-edge);
    }

.spectrum-SplitButton .spectrum-SplitButton-icon{
    display:block;
    margin-block-start:1px;
  }

.spectrum-SplitButton .spectrum-SplitButton-action, .spectrum-SplitButton .spectrum-SplitButton-trigger{
    position:relative;
  }

.spectrum-SplitButton .spectrum-SplitButton-action:focus-visible, .spectrum-SplitButton .spectrum-SplitButton-trigger:focus-visible,
.spectrum-SplitButton .spectrum-SplitButton-action.is-focus-visible,
.spectrum-SplitButton .spectrum-SplitButton-trigger.is-focus-visible{
      z-index:1;
      outline:none;
    }

.spectrum-SplitButton .spectrum-SplitButton-action.spectrum-Pagination-prevButton .spectrum-Icon, .spectrum-SplitButton .spectrum-SplitButton-trigger.spectrum-Pagination-prevButton .spectrum-Icon{
      transform:var(--spectrum-logical-rotation,) rotate(180deg);
    }

.spectrum-SplitButton .spectrum-SplitButton-action.spectrum-Pagination-nextButton .spectrum-Icon, .spectrum-SplitButton .spectrum-SplitButton-trigger.spectrum-Pagination-nextButton .spectrum-Icon{
      transform:var(--spectrum-logical-rotation);
    }

.spectrum-SplitButton .spectrum-SplitButton-action .spectrum-Button-label + .spectrum-Icon{
    margin-inline-start:var(--spectrum-splitbutton-icon-gap);
  }

.spectrum-SplitButton.spectrum-SplitButton--left .spectrum-SplitButton-action{
      border-start-start-radius:0;
      border-start-end-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
      border-end-end-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
      border-end-start-radius:0;
      margin-inline-end:0;
      margin-inline-start:var(--spectrum-spltibutton-margin-left);

      padding-inline-start:var(--spectrum-splitbutton-flat-edge-padding);
      padding-inline-end:var(--spectrum-splitbutton-round-edge-padding);
    }

.spectrum-SplitButton.spectrum-SplitButton--left .spectrum-SplitButton-action::after{
        border-start-start-radius:var(--spectrum-splitbutton-border-radius-edge);
        border-start-end-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
        border-end-end-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
        border-end-start-radius:var(--spectrum-splitbutton-border-radius-edge);
      }

.spectrum-SplitButton.spectrum-SplitButton--left .spectrum-SplitButton-action.spectrum-Button--accent{
        padding-inline-start:var(--spectrum-splitbutton-cta-flat-edge-padding);
        margin-inline-start:var(--spectrum-button-m-primary-outline-texticon-border-size);
      }

.spectrum-SplitButton.spectrum-SplitButton--left .spectrum-SplitButton-trigger{
      margin-inline-end:0;

      border-start-start-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
      border-start-end-radius:0;
      border-end-end-radius:0;
      border-end-start-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);

      border-inline-start-width:var(--spectrum-button-m-primary-outline-texticon-border-size);
      border-inline-end-width:var(--spectrum-splitbutton-trigger-border-left);

      padding-inline-end:var(--spectrum-splitbutton-trigger-flat-edge-padding);
      padding-inline-start:var(--spectrum-splitbutton-trigger-round-edge-padding);
    }

.spectrum-SplitButton.spectrum-SplitButton--left .spectrum-SplitButton-trigger::after{
        border-start-start-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
        border-start-end-radius:var(--spectrum-splitbutton-border-radius-edge);
        border-end-end-radius:var(--spectrum-splitbutton-border-radius-edge);
        border-end-start-radius:var(--spectrum-button-m-primary-outline-texticon-border-radius);
      }

.spectrum-SplitButton.spectrum-SplitButton--left .spectrum-SplitButton-trigger.spectrum-Button--accent{
        padding-inline-end:var(--spectrum-splitbutton-cta-trigger-flat-edge-padding);
        border-inline-end-width:var(--spectrum-button-m-primary-outline-texticon-border-size);
      }
