@use "global/common" as global;

/* ------------------------------
　　SNS OAuth認証ボタン
------------------------------ */
.sns-oauth {
  padding: 0;
  margin: 0;
  text-align: center;
  list-style: none;
}

.sns-oauth-item {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;

  & + & {
    margin-top: 1em;
  }
}

.sns-oauth-button {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  height: 44px;
  padding: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1;
  vertical-align: middle;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgb(0 0 0 / 20%);
  border-radius: 4px;
  transition: background-color 0.2s, border-color 0.2s;

  &::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background-color: transparent;
    transition: background-color 0.2s;
  }

  &:hover::before {
    background-color: rgb(0 0 0 / 10%);
  }

  &:active::before {
    background-color: rgb(0 0 0 / 30%);
  }

  &-google {
    &,
    &:hover,
    &:focus,
    &:active {
      color: #333;
      background-color: #fff;
      border-color: #cecece;
    }

    .sns-oauth-text {
      border-color: rgb(0 0 0 / 8%);
    }
  }

  &-line {
    &,
    &:hover,
    &:focus,
    &:active {
      color: #fff;
      background-color: #06c755;
      border-color: #06c755;
    }

    .sns-oauth-text {
      border-color: rgb(0 0 0 / 8%);
    }
  }

  &-x {
    &,
    &:hover,
    &:focus,
    &:active {
      color: #fff;
      background-color: #000;
      border-color: #000;
    }

    .sns-oauth-text {
      border-color: rgb(255 255 255 / 35%);
    }

    /* Xのみダーク系のためhoverカラーを反転 */
    &.sns-oauth-button:hover::before {
      background-color: rgb(255 255 255 / 25%);
    }

    &.sns-oauth-button:active::before {
      background-color: rgb(255 255 255 / 45%);
    }
  }
}

.sns-oauth-icon {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: grid;
  place-content: center;
  width: 42px;
}

.sns-oauth-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  border-color: rgb(0 0 0 / 8%);
  border-left-style: solid;
  border-left-width: 1px;
}
