@import "../../style/CommonStyle.module.less";
@import "../../style/utils.module.less";

.tButton {
  // common style
  width: auto;
  height: 78px;
  line-height: 78px;
  display: inline-block;
  background-color: #7a808d;
  color: @COLOR_WHITE;
  border-radius: 12px;
  font-weight: bold;
  font-size: 30px;
  transition: all 0.1s ease;
  padding: 0 12px;

  .text {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-align: center;
  }

  .marquee {
    width: 100%;
    > div > div {
      text-align: center;
    }
  }

  &.small {
    min-width: 180px;
    max-width: 300px;
    height: 60px;
    line-height: 60px;
    font-size: 24px;
    border-radius: 6px;
  }

  &.large {
    min-width: 324px;
    max-width: 650px;
    letter-spacing: -0.75px;
  }
  &.extra {
    min-width: 350px;
    max-width: 900px;
  }
  &.full {
    width: 100%;
  }
  &.basic {
    &.disabled {
      background-color: #7a808d;
    }
  }
  &.gray {
    background-color: @COLOR_GRAY03;
    &.disabled {
      color: #fff;
      background-color: @COLOR_GRAY03;
    }
  }
  &.white {
    color: @COLOR_GRAY03;
    background-color: @COLOR_WHITE;
    &:focus {
      box-shadow: 0px 18px 28.2px 1.8px rgba(62, 59, 59, 0.4);
      background-color: @PRIMARY_COLOR_RED;
      color: @COLOR_WHITE;
    }
    &.disabled {
      color: @COLOR_GRAY02;
      background-color: @COLOR_WHITE;
      border: 1px solid #dadada;
    }
  }

  &.popup {
    min-width: 240px;
    max-width: 340px;
  }

  &.focused {
    background-color: @PRIMARY_COLOR_RED;
    .focusDropShadow();
  }

  &.disabled {
    opacity: 0.3;
  }

  &.terms {
    background-color: @COLOR_WHITE;
    .flex(@justifyCenter: space-between);
    min-width: 530px;
    position: relative;
    height: 120px;
    font-size: 34px;
    color: @COLOR_GRAY08;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 0 20px;
    padding: 0 50px;
    box-shadow: 0 0 25px #0003;
    max-width: none;

    &:focus {
      border: 1px solid @PRIMARY_COLOR_RED;
      color: @PRIMARY_COLOR_RED;
    }

    &:after {
      content: "";
      background: url(../../../assets/images/icons/ic-pop-conts-go-nor.png);
      background-size: 37px 37px;
      background-repeat: no-repeat;
      background-position: center center;
      width: 38px;
      height: 38px;
    }
    &:focus {
      &:after {
        background: url(../../../assets/images/icons/ic-pop-conts-go-hov-new.png);
        background-size: 37px 37px;
        background-repeat: no-repeat;
        background-position: center center;
        width: 38px;
        height: 38px;
      }
    }
  }

  &.agree {
    width: auto;
    background-color: #999999;
    color: @COLOR_WHITE;
    min-width: 450px;
    height: 100px;
    margin: 0 20px;
    font-size: 30px;
    border-radius: 10px;
    box-sizing: border-box;
    .flex();
    box-shadow: 0 5px 5px #003, 0 6px 7px #0000001a;
    line-height: normal;

    &:focus {
      box-shadow: 0px 18px 28.2px 1.8px rgba(0, 0, 0, 0.4);
      font-size: 40px;
      // line-height: normal;
      background-color: @PRIMARY_COLOR_RED;
      color: @COLOR_WHITE;
    }
  }
  &.mypage {
    width: auto;
    background-color: #999999;
    color: @COLOR_WHITE;
    margin: 0 20px;
    font-size: 30px;
    border-radius: 10px;
    box-sizing: border-box;
    .flex();
    box-shadow: 0 5px 5px #003, 0 6px 7px #0000001a;
    line-height: normal;

    &:focus {
      box-shadow: 0px 18px 28.2px 1.8px rgba(0, 0, 0, 0.4);
      background-color: @PRIMARY_COLOR_RED;
      color: @COLOR_WHITE;
    }
  }

  &.oneDepthCategory {
    position: relative;
    max-width: none;
    min-width: 180px;
    height: 84px;
    padding: 24px 30px;
    background-color: @COLOR_WHITE;
    border-radius: 42px;
    font-size: 30px;
    font-weight: bold;
    line-height: normal;
    color: @COLOR_GRAY08;

    &:focus {
      color: @PRIMARY_COLOR_RED;
      &::after {
        .focused(@boxShadow: 0, @borderRadius: 42px);
      }
    }

    &.selected {
      background-color: @COLOR_WHITE;
      color: @PRIMARY_COLOR_RED;

      &:focus {
        &::after {
          .focused(@boxShadow: 0, @borderRadius: 42px);
        }
      }
    }
  }

  &.twoDepthCategory {
    position: relative;
    .flex();
    width: 300px;
    height: 72px;
    padding: 18px 30px;
    background-color: @COLOR_WHITE;
    border-radius: 12px;
    font-weight: normal;
    font-size: 30px;
    color: @COLOR_GRAY08;

    > div {
      width: 240px;
    }

    &:focus {
      font-weight: bold;
      color: @PRIMARY_COLOR_RED;

      &::after {
        .focused(@boxShadow: 0, @borderRadius: 12px);
      }
    }

    &.selected {
      background-color: @COLOR_NAVY;
      color: @COLOR_WHITE;

      &:focus {
        &::after {
          all: unset;
        }
      }
    }
  }

  &.topButton {
    .size(@w: 120px, @h: 120px);
    border-radius: 100%;
    background-image: url("../../../assets/images/rectangle-639@3x.png");
    background-position: center 31px;
    background-size: 32px 17px;
    background-repeat: no-repeat;
    display: block;
    margin: 60px auto;
    > div.topText {
      text-align: center;
      font-size: 30px;
      padding-top: 60px;
      line-height: 1;
    }
  }

  &.withAvatar {
    position: relative;
    min-width: 180px;
    height: 84px;
    padding: 24px 30px 24px 90px;
    background-color: @COLOR_WHITE;
    border-radius: 42px;
    font-size: 30px;
    font-weight: bold;
    line-height: normal;
    color: @COLOR_GRAY08;

    img {
      .position(@position: absolute, @top: 6px, @left: 6px);
      .size(@w: 72px, @h:72px);
      border-radius: 100%;
      object-fit: cover;
    }

    &:focus {
      color: @PRIMARY_COLOR_RED;
      &::after {
        .focused(@boxShadow: 0, @borderRadius: 42px);
      }
    }

    &.selected {
      background-color: @SELECTED_COLOR_RED;
      color: @COLOR_WHITE;

      &:focus {
        &::after {
          all: unset;
        }
      }
    }
  }
}
