@use "global/common" as global;

/* ------------------------------
　　SNS OAuth認証ボタン
------------------------------ */
.sns-oauth {
  margin: 0;
  padding: 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;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  border: 1px solid rgb(0 0 0 / 20%);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;

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

  &: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%);
    }
  }

  &-facebook {
    &,
    &:hover,
    &:focus,
    &:active {
      color: #fff;
      background-color: #1877f2;
      border-color: #1877f2;
    }

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

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

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