.c-tool-tag {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.c-tool-tag__content {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #666666;
  border-radius: 60px;
  padding: 8px 24px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.c-tool-tag__text {
  font-size: 14px;
  color: #00000099;
}

.c-tool-tag__content input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.c-tool-tag__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.c-tool-tag__icon img {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
}

/* 選択時のスタイル */
.c-tool-tag__content input[type="checkbox"]:checked ~ .c-tool-tag__text {
  color: #0284c7;
}

/* ラベル全体を光らせる */
.c-tool-tag__content:has(input[type="checkbox"]:checked) {
  border-color: #03a9f4;
  background: #eff6ff;
}

.c-tool-tag__content:has(input[type="checkbox"]:checked) .c-tool-tag__icon {
  width: 25px;
  opacity: 0.75;
  margin-left: 0;
  transform: rotate(45deg);
}

/* 非活性時 */
.c-tool-tag__content:has(input[type="checkbox"]:disabled) .c-tool-tag__text {
  color: #6b7280;
}

.c-tool-tag__content:has(input[type="checkbox"]:disabled) .c-tool-tag__icon {
  filter: grayscale(100%);
  opacity: 0.5;
}

@media (max-width: 768px) {
  .c-tool-tag {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 8px;
  }

  .c-tool-tag__content {
    width: 100%;
    min-height: 60px;
    gap: 0;
    box-sizing: border-box;
    height: 100%;
    justify-content: center;
    padding: 8px 12px;
  }

  .c-tool-tag__text {
    font-size: 14px;
    line-height: 1.3;
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
  }

  .c-tool-tag__icon {
    width: 20px;
    flex-shrink: 0;
    overflow: visible;
  }

  .c-tool-tag__icon img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
}
