// 리플레이 필터 컨트롤 스타일
// dark 프로젝트 패밀리 스타일 적용

.replay-control-v2 {
  background: var(--secondary1, rgba(255, 255, 255, 0.05));
  border-radius: 0.6rem;
  margin-bottom: 1.5rem;

  // 헤더 (접기/펼치기)
  .filter-header-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--tertiary2, rgba(255, 255, 255, 0.1));
    cursor: pointer;
    transition: background-color 0.2s;

    &:hover {
      background-color: var(--tertiary1, rgba(255, 255, 255, 0.03));
    }

    .filter-title {
      font-size: var(--fs-m, 1.3rem);
      font-weight: var(--fw-bold, 700);
      color: var(--white, #fff);
    }

    .toggle-icon {
      transition: transform 0.2s;

      &.is-open {
        transform: rotate(180deg);
      }
    }
  }

  .mb-3 {
    margin-bottom: 0;
  }
}

// 필터 섹션 공통 스타일
.sig-src-cd-filter {
  display: flex;
  border-bottom: 1px solid var(--tertiary2, rgba(255, 255, 255, 0.1));

  &:last-child {
    border-bottom: none;
  }

  .filter-header {
    width: 6rem;
    min-width: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--tertiary1, rgba(0, 0, 0, 0.2));
    padding: 1rem 0.5rem;

    h3 {
      margin: 0;
      font-size: var(--fs-s, 1.2rem);
      font-weight: var(--fw-semibold, 600);
      color: var(--tertiary4, #ccc);
      text-align: center;
      line-height: 1.4;

      div {
        margin-top: 0.2rem;
      }
    }
  }

  .filter-list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 0;
    padding: 1rem 1.2rem;
    font-size: var(--fs-s, 1.2rem);

    .filter-item-wrapper {
      display: flex;
      align-items: center;
      width: 33.33%;
      min-width: 10rem;

      @media (max-width: 500px) {
        width: 50%;
      }

      strong {
        font-size: var(--fs-s, 1.2rem);
        font-weight: var(--fw-medium, 500);
        color: var(--white, #fff);
        margin-right: 0.8rem;
        white-space: nowrap;
      }
    }

    // 토글 스위치 스타일
    .toggle-area {
      input[type="checkbox"] {
        display: none;

        &:checked + label {
          background-color: var(--primary1, #4a9eff);

          &::after {
            transform: translate3d(1.2rem, 0, 0);
          }
        }
      }

      label {
        cursor: pointer;
        display: block;
        position: relative;
        width: 2.6rem;
        height: 1.4rem;
        background-color: var(--tertiary3, #555);
        border-radius: 2rem;
        transition: all 0.3s ease-out;

        &::after {
          content: "";
          position: absolute;
          top: 0.2rem;
          left: 0.2rem;
          width: 1rem;
          height: 1rem;
          background-color: var(--white, #fff);
          border-radius: 50%;
          transition: all 0.3s ease-out;
        }

        &:hover {
          background-color: var(--tertiary4, #666);
        }
      }

      // 항적표시 토글 (주황색 액센트)
      &.trail-toggle {
        input[type="checkbox"]:checked + label {
          background-color: #ff9800;
        }
      }
    }
  }

  // 항적표시 필터 (단일 토글)
  &.trail-filter {
    .filter-list {
      .filter-item-wrapper {
        width: 100%;
      }
    }
  }
}
