@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-weight: bold;
  font-size: map.get(global.$font-scales, body-m);
}

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

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

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

.tag-link {
  display: inline-block;
  box-sizing: border-box;
  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;
  }
}

@media screen and (min-width: acms.$breakpoint-md-min) {
  .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;
  color: white;
  font-size: map.get(global.$font-scales, body-s);
  background: global.$color-primary;
}

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

  img {
    vertical-align: top;
  }
}
