/* ============================
	medal
============================ */

#medal #pagebody {
  background-color: rgba(238, 238, 244, 0.4);
}

#medal #main {
  max-width: none;
  padding: 0;
}

.medalist-heading {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px;
}

.filter-area {
  padding: 20px 15px;
}

#medalistList {
  background-color: var(--cl-black);
  padding: 40px 30px;
  list-style: none;
  margin: 0;
}

.sport-filter {
  position: relative;
  display: flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-width: min(400px, 100%);
  margin-inline: auto;
}

.sport-filter__button {
  width: 100%;
  min-height: 55px;
  border: 2px solid var(--cl-darkgray);
  border-radius: 10px;
  background: var(--cl-white);
  color: #000;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

#sportFilterLabel {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sport-filter__name {
  font-weight: 700;
}

.sport-filter__arrow {
  width: 13px;
  height: 13px;
  box-sizing: border-box;
  border-right: 2px solid var(--cl-darkgray);
  border-bottom: 2px solid var(--cl-darkgray);
  transform: translateY(-20.7%) rotate(45deg);
  flex: 0 0 auto;
}

.sport-filter.is-open .sport-filter__arrow {
  transform: translateY(20.7%) rotate(-135deg);
}

.sport-filter__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 6px;
  background: var(--cl-white);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  display: none;
  position: absolute;
  inset: calc(100% + 2px) 0 auto;
  min-width: 100%;
  z-index: 5;
}

.sport-filter.is-open .sport-filter__list {
  display: block;
}

.sport-filter__item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #000;
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
}

.sport-filter__item:hover,
.sport-filter__item:focus-visible {
  background: #f6f6f6;
}

.sport-filter__item.is-selected::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background: url("../img/ico_check.svg") center / contain no-repeat;
  flex: 0 0 auto;
}

/* 競技別メダリストカード
-------------------------------- */

.medalist-card {
  background: #f8f8fb;
  border-radius: 5px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 20px;
  overflow: hidden;
  text-align: left;
}

.medalist-card__head {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  padding: 24px;
  color: var(--cl-white);
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, .25);
  min-height: 167px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.medalist-card__head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .3);
}

.medalist-card__sport,
.medalist-card__sport-en {
  position: relative;
  margin: 0;
}

.medalist-card__sport {
  font-size: 32px;
  font-weight: 900;
}

.medalist-card__sport-en {
  font-size: 18px;
  font-style: italic;
}

.medalist-card__body {
  padding: 8px 8px 0;
}

.medalist-card__rank-group {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--cl-darkgray);
}

.medalist-card__rank-group:last-child {
  border-bottom: 0;
}

.medalist-card__rank-icon {
  flex: 0 0 16.25%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.medalist-card__rank-icon img {
  width: 42px;
  height: 40px;
  object-fit: contain;
}

.medalist-card__entries {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.medalist-card__entry {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 8px;
  border-bottom: 1px solid #929292;
  font-size: 14px;
  line-height: 1.5;
}

.medalist-card__entry:last-child {
  border-bottom: 0;
}

.medalist-card__entry-event {
  flex: 0 0 33.5%;
  margin: 0;
  font-weight: inherit;
}

.medalist-card__entry-athletes {
  flex: 1;
  min-width: 0;
  margin: 0;
}

@media all and (max-width: 767px) {
  #medalistList {
    padding: 25px 10px;
  }

  .medalist-card__head {
    padding: 8px 16px;
    min-height: 72px;
    gap: 4px;
  }

  .medalist-card__body {
    padding: 4px 4px 0;
  }

  .medalist-card__sport {
    font-size: 20px;
  }

  .medalist-card__sport-en {
    font-size: 14px;
    line-height: 1.5;
  }

  .medalist-card__rank-icon {
    flex-basis: 48px;
  }

  .medalist-card__rank-icon img {
    width: 25px;
    height: 24px;
  }

  .medalist-card__entry {
    font-size: 12px;
    padding: 12px 8px;
  }

  .medalist-card__entry-event {
    flex-basis: 120px;
  }
}
