@charset "utf-8";

/* ############################################################################################################################
#    2025 リニューアル
#    v1 Ranking 一覧ページ用ファイル
############################################################################################################################ */
select {
  -webkit-appearance: none;
  /* Safari */
  appearance: none;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
  background-color: transparent;
  border-radius: 0;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  box-sizing: border-box;
}

select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select:focus-visible {
  outline: 2px solid CanvasText;
  outline-offset: 2px;
}

.content.ranking {
  font-family: var(--font-noto-sans);
}

/* =======================================
  Buttons
======================================= */
.ranking__genre-buttons {
  margin-bottom: 24px;
  position: relative;
}

.ranking__genre-buttons-inner {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  width: 100%;
  border-bottom: 1px solid #e7e7e7;
  font-size: 0;
}

.ranking__genre-button {
  width: fit-content;
  padding: 15px 10px;
  background: transparent;
  border: none;
  line-height: 1;
  font-size: 16px;
  font-size: 1.6rem;
  font-weight: 500;
  color: #6d6d6d;
  cursor: pointer;
  position: relative;

  &[aria-selected="true"],
  &[data-selected="true"],
  &:hover {
    color: #212121;

    &::after {
      content: "";
      display: block;
      width: 100%;
      height: 1px;
      background: #212121;
      position: absolute;
      bottom: -1px;
      left: 0;
    }
  }
}

.ranking__time-selects {
  --border-color: #6d6d6d;

  width: fit-content;
  margin-left: auto;
  position: relative;

  /* アイコン */
  &::after {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    margin: auto;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    rotate: 135deg;
    position: absolute;
    top: 0;
    right: 20px;
    bottom: 5px;
  }
}

.ranking__time-select,
.ranking__time-select::picker(select) {
  appearance: base-select;
}

.ranking__time-select {
  padding: 8px 40px 8px 20px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 14px;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;

  &::picker-icon {
    display: none;
  }
}

/* =======================================
  Content
======================================= */
.ranking__content {
  min-height: 500px;
  margin: 30px auto 0;
  position: relative;
}

.ranking__container {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  transition: opacity .3s ease;
  opacity: 1;

  &.fade-hidden {
    opacity: 0;
  }
}

/* ローダー */
.ranking__loader {
  display: block;
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #ccc;
  border-top: 4px solid #333;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
  z-index: 100;
}

.ranking__loader.loader-hidden {
  display: none;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.ranking__error-text {
  text-align: center;
}
