@use "sass:map";
@use "global/acms-common" as acms;
@use "global/common" as global;

/* ------------------------------
　　タグ
------------------------------ */
.tag-wrapper {
  margin: 0 0 1.5rem;
}

.tag-title-inline {
  margin: 0 0 1rem;
  font-size: map.get(global.$font-scales, body-m);
}

.tag-box {
  padding: 1rem 0.5rem 0.25rem;
  background: global.$color-gray20;
}

.tag-filter-heading {
  margin: 0 0 1rem;
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 -0.5rem;
  list-style: none;
}

.tag-item {
  margin: 0 0.5rem 1rem;
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
  color: global.$color-text-side;

  .tag-list.is-sm & {
    font-size: map.get(global.$font-scales, body-s);
  }
}

.tag-link {
  box-sizing: border-box;
  display: inline-block;
  padding: 0.5rem 1rem;
  color: global.$color-text;
  text-decoration: none;
  background: global.$color-white;
  border: global.$border-width-sm solid global.$color-gray40;
  border-radius: 10em;

  &:link,
  &:visited {
    color: currentcolor;
  }

  &:active,
  &:focus {
    color: global.$color-text;
  }

  &:any-link:hover {
    color: global.$color-text;
    text-decoration: none;
    background: global.$color-gray20;
  }
}

@include acms.media-breakpoint-up(md) {
  .tag-wrapper {
    display: flex;
    margin: 0 0 1.5rem;
  }

  .tag-title-inline {
    margin: 0.5rem 2rem 0.5rem 0;
  }

  .tag-box {
    padding: 2rem 2rem 1.25rem;
  }

  .tag-list {
    flex: 1;
    flex-direction: row;
    margin: 0 -0.5rem;

    &.is-sm {
      margin: 0 -0.25rem;
    }
  }

  .tag-item {
    margin: 0 0.5rem 1rem;
    font-size: map.get(global.$font-scales, body-m);

    .tag-list.is-sm & {
      margin: 0 0.25rem 0.25rem;
      font-size: map.get(global.$font-scales, body-s);
    }
  }

  .tag-link {
    padding: 0.5rem 1rem;
  }
}

/* 会員限定タグ */
.tag-limited {
  display: inline-flex;
  align-items: center;
  padding: 0 0.5em;
  font-size: map.get(global.$font-scales, body-s);
  color: white;
  background: global.$color-primary;
}

.tag-limited-icon {
  line-height: 1;

  img {
    vertical-align: top;
  }
}
