﻿ion-segment {
  --min-height: 44px;
  &::-webkit-scrollbar {
    display: none;
  }
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */

  ion-segment-button {
    text-transform: unset;
    min-height: 44px;
    max-width: unset; // 因應文件檢視器檔名不折行展開，移除預設最大寬度。
    @include text-type(4, b1, m);

    &::part(indicator) {
      display: none;
    }

    &::part(native) {
      height: 100%;
      --ripple-color: #{get-color(or-500)};
    }

    ion-label {
      margin-top: auto;
      margin-bottom: 0px;
      padding-bottom: 8px;
    }

    &.segment-button-checked ion-label {
      @include text-type(d, b1, m);

      padding-bottom: 5px;
      border-bottom: 3px solid get-color(or-500);
    }
  }
}

ion-footer {
  box-shadow: var(--uofx-box-shadow-up);
  ion-segment {
    margin-bottom: var(--ion-safe-area-bottom);

    ion-segment-button {
      min-height: 44px;
      @include text-type(4, st2, m);

      ion-label {
        margin-top: auto;
        margin-bottom: auto;
        padding-bottom: 0px;
      }

      &::part(indicator) {
        display: none;
      }

      &.segment-button-checked {
        background-color: get-color(or-50);

        ion-label {
          @include text-type(pr, st2, m);
          padding-bottom: 0px;
          border-bottom-width: 0px;
        }
      }
    }
  }
}
