body {
  margin: 0;
  padding: 0;
}
.flex {
  display: flex;
}
.justify-between {
  justify-content: space-between;
}
.align-center {
  align-items: center;
}
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.gap-2 {
  gap: 8px;
}
.p-4 {
  padding: 16px;
}
.cursor-pointer {
  cursor: pointer;
}
.cursor-not-allowed {
  cursor: not-allowed;
}
.white-space-nowrap {
  white-space: nowrap;
}
.relative {
  position: relative;
}
.mt-0 {
  margin-top: 0;
}
.mb-2 {
  margin-bottom: 8px;
}
.mt-4 {
  margin-top: 16px;
}
.mt-8 {
  margin-top: 32px;
}
.ml-4 {
  margin-left: 16px;
}
.my-8 {
  margin-top: 32px;
  margin-bottom: 32px;
}
.pb-5 {
  padding-bottom: 20px;
}
.p-2 {
  padding: 8px;
}
.inline-block {
  display: inline-block;
}

.text-center {
  text-align: center !important;
}

.w-full {
  width: 100%;
}

.min-w-200 {
  min-width: 200px;
}
.max-h-40vh {
  max-height: 40vh;
  width: 100%;
  overflow: auto;
}

/* Just common table stuff. Really. */
.tableFixHead {
  overflow: auto;
  height: 400px;
  thead {
    th {
      position: sticky;
      top: 0;
      z-index: 1;
    }
  }
  table {
    border-collapse: collapse;
    width: 100%;
  }
  th {
    padding: 8px 16px;
    background: #1c3545;
  }
  td {
    padding: 8px 16px;
  }
}

.text-capitalize {
  text-transform: capitalize;
}

.enough-selected-exercise {
  pointer-events: none;
  color: #ddd;
}

.one-line {
  min-width: fit-content;
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.tooltip-export {
  position: relative;
  display: inline-block;
  .tooltiptext {
    visibility: hidden;
    width: 350px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    text-align: center;
    padding: 16px;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    height: fit-content;
    position: absolute;
    z-index: 100000;
    bottom: 100%;
    left: 50%;
    margin-left: -175px;

    &:after {
      content: " ";
      position: absolute;
      top: 100%; /* At the bottom of the tooltip */
      left: 50%;
      margin-left: -5px;
      border-width: 5px;
      border-style: solid;
      border-color: black transparent transparent transparent;
    }
  }

  .tooltip-bottom {
    top: 120% !important;
    &:after {
      top: -10px;
      transform: rotate(180deg);
    }
  }
}

.tooltip-export:hover .tooltiptext {
  visibility: visible;
}

#fileExport {
  font-family: Quicksand;
}

.container-export {
  max-width: 1117px;
  min-height: max(50vh, 560px);
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: 20px;
  .content-export {
    border-radius: 8px;
    border: 1px solid #9b9292;
    background: #fff;
    .title {
      color: #222;
      font-size: 20px;
      padding: 22px 8px;
      min-width: 174px;
      display: inline-block;
      text-align: center;
      text-transform: uppercase;
    }

    .body-export {
      color: #00000099;
      border-top: 1px solid #9b9292;
      padding: 16px 34px 20px 60px;

      .school-code {
        .input-school-code {
          position: relative;
          input {
            border-radius: 4px;
            border: 1px solid #0000001f;
            background: #fff;
            padding: 0 16px;
            height: 38px;
            min-width: 280px;
            color: #000000;
            &:focus {
              outline: none;
            }
          }
          .message-error {
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            color: #ff0000b3;
            font-size: 12px;
            margin-top: 4px;
          }
        }
      }

      /* Bộ lọc */
      .filter {
        margin-top: 60px;
        padding-bottom: 60px;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: flex-end;
        grid-gap: 16px;
        border-bottom: 1px solid #d3d3d3;
        .class,
        .book,
        .subject,
        .exam {
          select {
            border-radius: 4px;
            border: 1px solid #0000001f;
            background: #fff;
            padding: 0 16px;
            height: 40px;
            min-width: 174px;
            width: 100%;
            &:focus {
              outline: none;
            }
          }
        }

        .btn-view {
          width: 100%;
          text-align: right;
        }

        .selected_item-select {
          position: relative;
          max-height: 40px;
          padding: 8px 16px;
          border-radius: 4px;
          border: 1px solid #0000001f;
          background: #fff;
          font-size: 16px;
          font-style: normal;
          font-weight: 500;
          color: #00000099;
          display: flex;
          justify-content: space-between;
          align-items: center;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        .selected_item-popup {
          max-height: max(40vh, 250px);
          overflow: auto;
          position: absolute;
          right: 0;
          z-index: 10000;
          width: 100%;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          align-self: stretch;
          border-radius: 8px;
          background: #fff;
          box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
          margin-top: 8px;
        }
        .selected_item-popup-item {
          padding: 12px;
          width: -webkit-fill-available;
          &:hover {
            background: var(--Primary-100, #fff0e7);
          }
        }
      }

      /* Kết quả tìm kiếm */
      .result-search {
        .title-name {
          margin-top: 12px;
          display: flex;
          justify-content: space-between;
          align-items: center;
          p {
            color: #222;
            font-size: 20px;
            font-weight: 500;
          }
          .export {
            color: #000000;
            font-size: 16px;
            font-weight: 600;
            display: flex;
            gap: 16px;
            padding: 10px 16px;
            border-radius: 4px;
            border: 1px solid #cfcfcf;
            background: #fff;
            position: relative;

            .dropdown {
              #arrow-dropdown {
                cursor: pointer;
                padding-left: 10px;
                border-left: 1px solid #cfcfcf;
              }
            }
            .dropdown-content {
              position: absolute;
              top: calc(100% + 8px);
              right: 0;
              width: 100%;
              min-width: 384px;
              border-radius: 8px;
              border: 1px solid #c6c5c5;
              background: #fff;
              .item-export {
                cursor: pointer;
                &:hover {
                  background: #f5f5f5;
                  color: #000;
                }
              }

              .active-type {
                background: #d6d6d6 !important;
                color: #191919 !important;
              }
            }
          }
        }

        .list-result {
          margin-top: 24px;
          min-height: 300px;
          .loading {
            text-align: center;
          }

          .result {
            width: 100%;
            height: fit-content;
            text-align: center;

            table {
              width: 100%;
              border-collapse: collapse;
              border-spacing: 0;
              font-size: 13px;

              thead {
                tr {
                  background: #1c3545;
                  th {
                    color: #fff;
                    text-align: left;
                    padding: 12px 20px;
                    border-bottom: 1px solid #d3d3d3;
                    font-weight: 600;
                    white-space: nowrap;
                  }
                }
              }

              tbody {
                tr {
                  td {
                    padding: 12px 20px;
                    border-bottom: 1px solid #d3d3d3;
                    color: #333333;
                    font-weight: 500;
                    text-align: left;
                  }
                  .student-name {
                    text-decoration: none;
                    color: #2f80ed;
                    font-weight: 500;
                  }
                }
              }
            }
          }

          .no-result {
            margin-top: 32px;
          }
        }
      }
    }
  }

  button {
    white-space: nowrap;
    color: #fff;
    border: none;
    border-radius: 4px;
    background: #ff6200c9;
    padding: 8px 16px;
    cursor: pointer;
    height: 40px;
    font-size: 16px;
    font-weight: 600;
    &:hover {
      background: #ff6200;
    }
    &:disabled {
      background: #ff66094d;
      cursor: not-allowed !important;
    }
  }
}

/* Paginate */
.right {
  text-align: right;

  .pagination {
    display: inline-flex;
    gap: 4px;
    .input-page {
      border-radius: 4px;
      border: 1px solid #0000001f;
      background: #fff;
      padding: 0 16px;
      height: 38px;
      max-width: 80px;
      color: #000000;
    }
    .page-item {
      color: black;
      float: left;
      padding: 8px 16px;
      text-decoration: none;
      border: 1px solid #ddd;
      cursor: pointer;
      &:hover {
        &:not(.active) {
          background-color: #ddd;
        }
      }
      &:first-child {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
      }
      &:last-child {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
      }
    }
    .disable-btn {
      cursor: not-allowed;
      color: #ccc;
      background: #f8f8f8 !important;
    }
    .page-item.active {
      background-color: #ff6200c9;
      color: #fff;
      border: 1px solid #ff6200c9;
    }
  }
}

/* Paginate */

/* HTML: <div class="loader"></div> */
.loader-1 {
  width: 50px;
  aspect-ratio: 1;
  display: grid;
  border: 4px solid #0000;
  border-radius: 50%;
  border-color: #ccc #0000;
  animation: l16 1s infinite linear;
}
.loader-1::before,
.loader-1::after {
  content: "";
  grid-area: 1/1;
  margin: 2px;
  border: inherit;
  border-radius: 50%;
}
.loader-1::before {
  border-color: #f03355 #0000;
  animation: inherit;
  animation-duration: 0.5s;
  animation-direction: reverse;
}
.loader-1::after {
  margin: 8px;
}
@keyframes l16 {
  100% {
    transform: rotate(1turn);
  }
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 40px;
  aspect-ratio: 1;
  border: 2px solid;
  box-sizing: border-box;
  color: #2b2b2b;
  background: radial-gradient(circle 3px, currentColor 95%, #0000),
    linear-gradient(currentColor 50%, #0000 0) 50%/3px 80% no-repeat,
    linear-gradient(90deg, currentColor 50%, #0000 0) 50%/60% 3px no-repeat;
  position: relative;
}
.loader:before {
  content: "";
  position: absolute;
  height: 50px;
  inset: 100% 10% auto;
  background: radial-gradient(
      circle closest-side at 50% calc(100% - 10px),
      currentColor 94%,
      #0000
    ),
    linear-gradient(currentColor 0 0) top/3px 80% no-repeat;
  transform-origin: top;
  animation: l2 2s infinite cubic-bezier(0.5, 200, 0.5, -200);
}
@keyframes l2 {
  100% {
    transform: rotate(0.4deg);
  }
}
