// src/views/MyPagePanel/MyPageSub/TermsOfService/TermsOfOptional.module.less
// IntroPanel 기반으로 단순화된 스타일 - 모달 관련 문제 없음

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

.panel {
  > section {
    color: @COLOR_GRAY06;
  }
}

.introLayout {
  .flex(@direction: column);
  background-color: @BG_COLOR_03;
  text-align: center;
  width: 100%;
  height: 100vh;

  .title {
    font-size: 60px;
    padding: 44px 201px;
    white-space: pre-wrap;
    line-height: normal;
  }

  .welcomeText {
    color: #807f81;
    font-size: clamp(48px, 3.23vw, 62px);
    font-family: "LG Smart UI";
    font-weight: 400;
    line-height: 1;
    word-break: break-word;
    margin-right: 14px;
  }

  .txtPoint {
    font-weight: bold;
    font-size: 74px;
    color: #57585a;
  }

  .brandShop {
    color: #57585a;
  }

  .pointColor {
    color: #c91d53;
  }

  .brandPTime {
    color: #57585a;
  }

  .description {
    width: 1200px;
    white-space: pre-wrap;
    line-height: normal;
    font-size: 36px;
    padding: 0 10px;
    padding-top: 14px;
    color: #807f81;
    margin: 0 auto;
  }

  .termsItemsLayer {
    display: flex;
    flex-direction: column;
    margin: 113px 0 60px 0;
    gap: 20px;
    align-items: center;

    .termItem {
      display: flex;
      align-items: center;
      gap: 20px;
      width: 100%;
      max-width: 800px;
      justify-content: flex-start;
    }

    .termsButton {
      flex: 1;

      > div {
        padding-right: 10px;
      }
    }
  }

  .selectAllSection {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
  }

  .bottomBtnLayer {
    margin-top: 50px;
    .flex();
    gap: 40px;
  }
}

// 체크박스 스타일
.termCheckbox,
.selectAllCheckbox {
  width: 45px !important;
  height: 45px !important;
  min-width: 45px !important;
  min-height: 45px !important;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;

  &.tCheckBox {
    border-radius: 0 !important;
    border: 3px solid #c70850 !important;
    background: #fff !important;
    transition: background 0.15s, border 0.15s;
  }

  &.tCheckBox.selected {
    border: 3px solid #7a808d !important;
    background: #7a808d !important;
  }

  &.tCheckBox::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px !important;
    height: 10px !important;
    border-left: 4px solid #fff !important;
    border-bottom: 4px solid #fff !important;
    transform: translate(-50%, -70%) rotate(-45deg) scale(0);
    border-radius: 0 !important;
    transition: transform 0.2s ease-in-out;
  }

  &.tCheckBox.selected::before {
    transform: translate(-50%, -70%) rotate(-45deg) scale(1);
  }
}

// 약관 박스 스타일
.termBox {
  width: 100%;
  min-width: 500px;
  height: 80px;
  padding: 0 30px;
  background: white;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  outline: 1px #cfcfcf solid;
  outline-offset: -1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;

  &:focus {
    outline: 2px #c91d53 solid !important;
    outline-offset: 2px !important;
    background-color: rgba(201, 29, 83, 0.1) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(201, 29, 83, 0.3) !important;
  }

  &:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
}

.termName {
  color: #1a1a1a;
  font-size: 30px;
  font-family: "LG Smart UI";
  font-weight: 700;
  line-height: 30px;
  word-wrap: break-word;
  transition: color 0.3s ease;
  flex: 1;
  text-align: left;
  margin-right: 20px;

  &.titleHovered {
    color: #c70850;
    font-weight: bold;
  }
}

.termNameMandatory {
  color: #207847 !important;
}

.expandIconContainer {
  width: 37px;
  height: 37px;
  position: relative;
  border-radius: 100px;
  outline: 2.5px black solid;
  outline-offset: -2.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;

  &:hover {
    transform: scale(1.05);
  }

  svg {
    width: 100%;
    height: 100%;
  }
}

.selectAllText {
  color: #1a1a1a;
  font-size: 35px;
  font-family: "LG Smart UI";
  font-weight: 700;
  line-height: 35px;
  word-break: break-word;
}

// 버튼 스타일
.agreeButton {
  width: 450px;
  height: 100px;
  padding-left: 50px;
  padding-right: 50px;
  background-color: #c70850 !important;
  border: 2px solid #c70850 !important;
  color: white !important;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  font-family: "LG Smart UI";
  font-weight: 700;
  transition: all 0.3s ease;

  &:hover,
  &:focus,
  &.spott-focus {
    background-color: #a40640 !important;
    border-color: #a40640 !important;
    color: white !important;
    transform: scale(1.05);
  }

  &:active {
    background-color: #8f0533 !important;
    border-color: #8f0533 !important;
    color: white !important;
  }
}

.disagreeButton {
  width: 450px;
  height: 100px;
  padding-left: 50px;
  padding-right: 50px;
  background-color: #999999 !important;
  border: 2px solid #999999 !important;
  color: white !important;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  font-family: "LG Smart UI";
  font-weight: 700;
  transition: all 0.3s ease;

  &:hover,
  &:focus,
  &.spott-focus {
    background-color: #7a7a7a !important;
    border-color: #7a7a7a !important;
    color: white !important;
    transform: scale(1.05);
  }

  &:active {
    background-color: #666666 !important;
    border-color: #666666 !important;
    color: white !important;
  }
}

// Spotlight 포커스 스타일
[data-spotlight-id]:focus {
  // outline: 2px solid #C91D53;
  // outline-offset: 2px;
  // box-shadow: 0 0 8px rgba(201, 29, 83, 0.5);
}

.termBox[data-spotlight-id]:focus {
  background-color: rgba(201, 29, 83, 0.1);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

.termCheckbox[data-spotlight-id]:focus {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

// IntroPanel 스타일 호환성을 위한 추가 클래스들
.introTermsConts {
  background-color: #f8f8f8;

  > div:nth-child(2) {
    background-color: @COLOR_WHITE;
    .border-solid(1px,@COLOR_GRAY02);
    width: 980px;
    height: 300px;
  }

  .termsDesc {
    padding: 30px;
    min-height: 300px;
    color: @COLOR_GRAY03;
    font-size: 24px;
    line-height: 1.27;
    letter-spacing: normal;
    text-align: left;
    .flex( @direction:column, @justifyCenter:flex-start,@alignCenter:flex-start);
  }
}

.tab {
  width: 980px;
}
