@charset "utf-8";

:root {
  --tier0-color: #ccc;
  --tier1-color: hsl(0 70% 70%);
  --tier2-color: hsl(30 70% 70%);
  --tier3-color: hsl(60 70% 70%);
  --tier4-color: hsl(120 70% 70%);
  --tier5-color: hsl(180 70% 70%);
  --tier6-color: hsl(240 70% 70%);
  --link-color: #4e94ce;
  --link-hover-color: #63afee;
  --font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background: #1f1f1f;
  color: #ccc;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
  padding-top: 50px;
}

.bi::before {
  display: block;
}

/* following-card-image **************************************/
.following-card-image {
  position: fixed;
  opacity: 0.5;
  pointer-events: none;

  &.hidden {
    display: none;
  }
}

/* row-menu-modal ********************************************/
.row-menu-modal {
  position: fixed;
  width: 250px;
  z-index: 99999;
  box-shadow: 0 0 2px #0001;
  border-radius: 12px;

  &.hidden {
    display: none;
  }

  .label-color-radio-container {
    display: grid;
    grid-template-columns: repeat(7, 32px);
    grid-template-rows: 32px;
    place-items: center;
    background: #282828;
    padding: 8px 13px 6px;
    border-radius: 12px 12px 0 0;

    label {
      display: block;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      border: 2px solid #fff;
      filter: brightness(0.8);
      transition: width 0.1s, height 0.1s;

      &:has(:checked) {
        width: 32px;
        height: 32px;
        filter: brightness(1.2);
      }

      &:nth-child(1) {
        background: var(--tier1-color);
      }

      &:nth-child(2) {
        background: var(--tier2-color);
      }

      &:nth-child(3) {
        background: var(--tier3-color);
      }

      &:nth-child(4) {
        background: var(--tier4-color);
      }

      &:nth-child(5) {
        background: var(--tier5-color);
      }

      &:nth-child(6) {
        background: var(--tier6-color);
      }

      &:nth-child(7) {
        background: var(--tier0-color);
      }

      input {
        display: none;
      }
    }
  }

  button {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 36px;
    background: #282828;
    color: #f1f1f1;
    padding: 0 16px;

    &:last-child {
      border-radius: 0 0 12px 12px;
    }
  }

  @media (hover: hover) {
    button:hover {
      filter: brightness(1.5);
    }
  }

  .bi-wrapper {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
  }

  .bi-chevron-up {
    font-size: 14px;
  }

  .bi-chevron-down {
    font-size: 14px;
  }
}

/* common ****************************************************/
.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 30px;

  @media (max-width: 1300px) {
    max-width: 1200px;
    padding: 0;
    width: calc(100% - 16px);
  }
}

/* header ****************************************************/
header {
  user-select: none;
  padding: 8px 0;
  height: 48px;
  position: fixed;
  inset: 0 0 auto;
  background: #1f1f1f;
  z-index: 9999;

  button {
    height: 32px;
  }

  select {
    height: 32px;
    padding: 0 4px;
  }

  .preview-menu-container {
    display: none;
  }

  .info-menu-container {
    display: none;
  }
}

/* main ******************************************************/
main {
  flex: 1;
  flex-shrink: 0;
  padding-bottom: 8px;
}

.main-section {
  user-select: none;
  display: flex;
  flex-direction: column;
}

.preview-section {
  display: none;
}

.info-section {
  display: none;
}

.card-image {
  cursor: pointer;

  &.dragging {
    opacity: 0.15;
  }
}

.row-list {
  flex-shrink: 0;
  margin-right: -8px;

  .row-item {
    display: flex;

    &[data-label-color-index="0"] .label-outer {
      background: var(--tier0-color);
    }

    &[data-label-color-index="1"] .label-outer {
      background: var(--tier1-color);
    }

    &[data-label-color-index="2"] .label-outer {
      background: var(--tier2-color);
    }

    &[data-label-color-index="3"] .label-outer {
      background: var(--tier3-color);
    }

    &[data-label-color-index="4"] .label-outer {
      background: var(--tier4-color);
    }

    &[data-label-color-index="5"] .label-outer {
      background: var(--tier5-color);
    }

    &[data-label-color-index="6"] .label-outer {
      background: var(--tier6-color);
    }

    &.active {
      .row-main-container {
        .row-main-container-inner {
          outline-offset: 1px;
          outline: 2px solid #fff;
          position: relative;
          z-index: 1;
        }
      }
    }

    &:last-child {
      .row-main-container {
        border-bottom: 1px solid #181818;
      }
    }

    .row-main-container {
      flex: 1;
      flex-shrink: 0;
      border-top: 1px solid #181818;
      border-left: 1px solid #181818;
      border-right: 1px solid #181818;

      .row-main-container-inner {
        display: flex;

        .label-outer {
          flex-shrink: 0;
          display: flex;
          align-items: center;
          border-right: 1px solid #181818;

          .label {
            width: 80px;
            text-align: center;
            color: #2f2f2f;
            cursor: pointer;

            &:focus {
              z-index: 1;
            }
          }
        }

        .board {
          flex: 1;
          flex-shrink: 0;
          display: grid;
          align-content: start;
          grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
          min-height: 53px;
          background: #1b1b1b;

          >img {
            width: 100%;
          }
        }
      }
    }

    .row-menu-button-container {
      flex-shrink: 0;
      display: grid;
      place-items: center;
      width: 32px;

      .row-menu-button {
        all: unset;
        box-sizing: border-box;
        cursor: pointer;
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        transition: background-color 0.1s;
      }

      @media (hover: hover) {
        .row-menu-button:hover {
          background-color: #fff3;
        }
      }
    }
  }
}

.book {
  flex: 1;
  flex-shrink: 0;
  margin-top: 8px;
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  min-height: 106px;
  padding-right: 24px;

  >img {
    width: 100%;
  }
}

/* aside *****************************************************/
aside {
  text-align: center;
}

/* footer ****************************************************/
footer {
  display: none;
  flex-shrink: 0;
  text-align: center;
  line-height: 32px;
  background: #1b1b1b;
  color: #8f8f8f;

  small {
    font-size: 13px;
  }
}
