:host {
  /**
   * @prop --background: Background of the button
   * @prop --background-activated: Background of the button when pressed. Note: setting this will interfere with the Material Design ripple.
   * @prop --background-activated-opacity: Opacity of the button when pressed
   * @prop --background-focused: Background of the button when focused with the tab key
   * @prop --background-focused-opacity: Opacity of the button when focused with the tab key
   * @prop --background-hover: Background of the button on hover
   * @prop --background-hover-opacity: Opacity of the background on hover
   *
   * @prop --color: Text color of the button
   * @prop --color-activated: Text color of the button when pressed
   * @prop --color-focused: Text color of the button when focused with the tab key
   * @prop --color-hover: Text color of the button when hover
   *
   * @prop --transition: Transition of the button
   *
   * @prop --border-radius: Border radius of the button
   * @prop --border-width: Border width of the button
   * @prop --border-style: Border style of the button
   * @prop --border-color: Border color of the button
   *
   * @prop --ripple-color: Color of the button ripple effect
   *
   * @prop --box-shadow: Box shadow of the button
   * @prop --opacity: Opacity of the button
   *
   * @prop --padding-top: Top padding of the button
   * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the button
   * @prop --padding-bottom: Bottom padding of the button
   * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the button
   */
  --overflow: hidden;
  --ripple-color: currentColor;
  --border-width: initial;
  --border-color: initial;
  --border-style: initial;
  --color-activated: var(--color);
  --color-focused: var(--color);
  --color-hover: var(--color);
  --box-shadow: 0px 8px 16px rgba(171, 190, 209, 0.4);
  display: inline-block;
  width: auto;
  color: var(--color);
  font-family: var(--gasco-font-family, inherit);
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
  vertical-align: top;
  vertical-align: -webkit-baseline-middle;
  font-kerning: none;
}

:host(.button-solid) {
  --background: var(--gasco-color-primary, #00A3E0);
  --color: var(--gasco-color-primary-contrast, #fff);
}

:host(.button-outline) {
  --border-color: var(--gasco-color-primary, #00A3E0);
  --background: transparent;
  --color: var(--gasco-color-primary, #00A3E0);
}

:host(.button-clear) {
  --border-width: 0;
  --background: transparent;
  --color: var(--gasco-color-primary, #00A3E0);
}

:host(.button-block) {
  display: block;
}

:host(.button-block) .button-native {
  margin-left: 0;
  margin-right: 0;
  display: block;
  width: 100%;
  clear: both;
  contain: content;
}

:host(.button-block) .button-native::after {
  clear: both;
}

:host(.button-full) {
  display: block;
}

:host(.button-full) .button-native {
  margin-left: 0;
  margin-right: 0;
  display: block;
  width: 100%;
  contain: content;
}

:host(.button-full:not(.button-round)) .button-native {
  border-radius: 0;
  border-right-width: 0;
  border-left-width: 0;
}

:host(.button-disabled) {
  cursor: default;
  pointer-events: none;
}

:host(.button-disabled.button-solid),
:host(.button-disabled.button-solid) .button-native {
  --background: #F1F1F1 !important;
  --color: #CCCCCC !important;
}

:host(.button-disabled.button-outline),
:host(.button-disabled.button-outline) .button-native {
  --border-color: #CCCCCC !important;
  --color: #CCCCCC !important;
}

:host(.button-disabled.button-clear),
:host(.button-disabled.button-clear) .button-native {
  --color: #CCCCCC !important;
}

.button-native {
  border-radius: var(--border-radius);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: var(--padding-start);
  padding-right: var(--padding-end);
  padding-top: var(--padding-top);
  padding-bottom: var(--padding-bottom);
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-decoration: inherit;
  text-indent: inherit;
  text-overflow: inherit;
  text-transform: inherit;
  text-align: inherit;
  white-space: inherit;
  color: inherit;
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transition: var(--transition);
  border-width: var(--border-width);
  border-style: var(--border-style);
  border-color: var(--border-color);
  outline: none;
  background: var(--background);
  line-height: 1;
  contain: layout style;
  cursor: pointer;
  opacity: var(--opacity);
  overflow: var(--overflow);
  z-index: 0;
  box-sizing: border-box;
  appearance: none;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  .button-native {
    padding-left: unset;
    padding-right: unset;
    -webkit-padding-start: var(--padding-start);
    padding-inline-start: var(--padding-start);
    -webkit-padding-end: var(--padding-end);
    padding-inline-end: var(--padding-end);
  }
}

.button-native::-moz-focus-inner {
  border: 0;
}

.button-inner {
  display: flex;
  position: relative;
  flex-flow: row nowrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.button-inner .button-progress {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid #F1F1F170;
  border-bottom-color: #FFFFFF;
  border-radius: 50%;
  display: inline-block;
  animation: rotation 1s linear infinite;
}

/* keyFrames */
@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
::slotted(ion-icon) {
  font-size: 1.4em;
  pointer-events: none;
}

::slotted(ion-icon[slot=start]) {
  margin-left: -0.3em;
  margin-right: 0.3em;
  margin-top: 0;
  margin-bottom: 0;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  ::slotted(ion-icon[slot=start]) {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: -0.3em;
    margin-inline-start: -0.3em;
    -webkit-margin-end: 0.3em;
    margin-inline-end: 0.3em;
  }
}

::slotted(ion-icon[slot=end]) {
  margin-left: 0.3em;
  margin-right: -0.2em;
  margin-top: 0;
  margin-bottom: 0;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  ::slotted(ion-icon[slot=end]) {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: 0.3em;
    margin-inline-start: 0.3em;
    -webkit-margin-end: -0.2em;
    margin-inline-end: -0.2em;
  }
}

::slotted(ion-icon[slot=icon-only]) {
  font-size: 1.8em;
}

:host(.button-outline) .button-native.progress .button-inner .button-progress,
:host(.button-clear) .button-native.progress .button-inner .button-progress {
  border-bottom-color: var(--gasco-color-base);
}

:host(.button-solid.button-large) .button-native.progress .button-inner .button-progress,
:host(.button-outline.button-large) .button-native.progress .button-inner .button-progress,
:host(.button-clear.button-large) .button-native.progress .button-inner .button-progress {
  width: 18px;
  height: 18px;
}

:host(.button-solid.button-small) .button-native.progress .button-inner .button-progress,
:host(.button-outline.button-small) .button-native.progress .button-inner .button-progress,
:host(.button-clear.button-small) .button-native.progress .button-inner .button-progress {
  width: 10px;
  height: 10px;
}

::slotted(i) {
  font-size: 1.4em !important;
  pointer-events: none;
}

::slotted(i[slot=start]) {
  margin-left: -0.3em;
  margin-right: 0.3em;
  margin-top: 0;
  margin-bottom: 0;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  ::slotted(i[slot=start]) {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: -0.3em;
    margin-inline-start: -0.3em;
    -webkit-margin-end: 0.3em;
    margin-inline-end: 0.3em;
  }
}

::slotted(i[slot=end]) {
  margin-left: 0.3em;
  margin-right: -0.2em;
  margin-top: 0;
  margin-bottom: 0;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  ::slotted(i[slot=end]) {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: 0.3em;
    margin-inline-start: 0.3em;
    -webkit-margin-end: -0.2em;
    margin-inline-end: -0.2em;
  }
}

::slotted(i[slot=icon-only]) {
  font-size: 1.8em !important;
}

.button-native::after {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  content: "";
  opacity: 0;
}

:host(.gasco-activated) {
  color: var(--color-activated);
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
}

:host(.gasco-activated) .button-native::after {
  background: var(--background-activated);
  opacity: var(--background-activated-opacity);
}

:host(.gasco-focused) {
  color: var(--color-focused);
}

@media (any-hover: hover) {
  :host(:hover) {
    color: var(--color-hover);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
  }

  :host(:hover) .button-native::after {
    background: var(--background-hover);
    opacity: var(--background-hover-opacity);
  }
}
:host {
  --border-radius: 8px;
  --padding-top: 0;
  --padding-bottom: 0;
  --padding-start: 1.1em;
  --padding-end: 1.1em;
  --transition: box-shadow 280ms cubic-bezier(.4, 0, .2, 1),
                background-color 15ms linear,
                color 15ms linear;
  margin-left: 2px;
  margin-right: 2px;
  margin-top: 4px;
  margin-bottom: 4px;
  max-width: 247.15px;
  width: 100%;
  height: 50px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.06em;
  transition: 300ms;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  :host {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: 2px;
    margin-inline-start: 2px;
    -webkit-margin-end: 2px;
    margin-inline-end: 2px;
  }
}

:host(.button-solid, :host(.button-outline)) {
  --background-activated: transparent;
  --background-hover: var(--gasco-color-primary-contrast, #fff);
  --background-focused: var(--gasco-color-primary-contrast, #fff);
  --background-activated-opacity: 0;
  --background-focused-opacity: .24;
  --background-hover-opacity: .08;
  --box-shadow: 0px 8px 16px rgba(171, 190, 209, 0.4);
}

:host(.button-solid.gasco-activated) {
  --box-shadow: 0px 8px 16px rgba(171, 190, 209, 0.4);
}

:host(.button-outline) {
  --border-width: 2px;
  --border-style: solid;
}

:host(.button-outline.gasco-activated.gasco-color) .button-native {
  background: transparent;
}

:host(.button-clear) {
  --background-activated: transparent;
  --background-focused: var(--gasco-color-primary, #00A3E0);
  --background-hover: var(--gasco-color-primary, #00A3E0);
  --background-activated-opacity: 0;
  --background-focused-opacity: .12;
  --background-hover-opacity: .04;
}

:host(.button-round) {
  --border-radius: 64px;
  --padding-top: 0;
  --padding-bottom: 0;
}

:host(.button-large:not(.gasco-button-icon)) {
  --padding-top: 0;
  --padding-start: 1em;
  --padding-end: 1em;
  --padding-bottom: 0;
  height: 60px;
  max-width: 300px;
  font-size: 18px;
}

:host(.button-small:not(.gasco-button-icon)) {
  --padding-top: 0;
  --padding-start: 0.9em;
  --padding-end: 0.9em;
  --padding-bottom: 0;
  height: 40px;
  max-width: 200.65px;
  font-size: 14px;
}

:host(.button-strong) {
  font-weight: bold;
}

::slotted(i[slot=icon-only]) {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/**
 * Only allow overriding of opacity here
 * as developers should not be overriding
 * colors when using the color prop.
 */
:host(.button-solid.gasco-color.gasco-focused) .button-native::after {
  background: var(--gasco-color-contrast);
}

:host(.button-clear.gasco-color.gasco-focused) .button-native::after,
:host(.button-outline.gasco-color.gasco-focused) .button-native::after {
  background: var(--gasco-color-base);
}

:host(.button-solid:active) .button-native:not(.progress) {
  box-shadow: inset 0 0 10px 50px rgba(0, 0, 0, 0.15);
}

:host {
  width: 50px;
}

.button-native {
  padding: 0;
}

:host(.button-outline) {
  --border-width: 1.5px;
  --border-style: solid;
}

:host(.button-large.button-solid.gasco-button-icon),
:host(.button-large.button-outline) {
  width: 60px;
  height: 60px;
}

:host(.button-small.button-solid.gasco-button-icon),
:host(.button-small.button-outline) {
  width: 40px;
  height: 40px;
}

:host(.button-solid.button-disabled) {
  --background: #F1F1F1 !important;
  --color: #CCCCCC !important;
}