.system-view-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem 0;

  .tab {
    background-color: #f5f5fa;
    padding: 0.75rem 2.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.25s ease-in-out, color 0.25s ease-in-out;
    text-transform: uppercase;
    font-weight: 600;

    &:hover {
      background-color: #00aaff;
      color: #fff;
    }

    img {
      max-width: 18px;
    }
  }
  & .active {
    background-color: #00aaff;
    color: #fff;
  }
}

.tab-content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
}

.system-view-rows {
  display: grid;
  grid-template-columns: 2fr 2fr 4fr;
  align-items: stretch;
  gap: 0.5rem;

  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 0.25rem;
  }

  ::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 0.25rem;
  }

  .system-view-body {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: #f3f3fa;
    border-radius: 0.5rem;
    justify-content: stretch;
    height: 100%;
    overflow: hidden;
    border: 3px solid #f3f3fa;

    ::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }
    ::-webkit-scrollbar-track {
      background: #eee;
      border-radius: 0.5rem;
    }

    ::-webkit-scrollbar-thumb {
      background-color: #ccc;
      border-radius: 0.5rem;
    }

    .title {
      font-size: 2rem;
      color: #676a6d;
      font-weight: 600;
      padding: 0 0 1rem 0.5rem;
    }

    .system-view {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      flex-grow: 1;
      background-color: #fff;
      border: 3px solid #FFF;
      border-radius: 0.5rem;
      padding: 1rem;
      justify-content: space-between;
      position: relative;
      max-height: 250px;
      overflow: auto;

      .system-title {
        display: flex;
        align-items: center;
        gap: 1rem;
        font-weight: 600;
        border-bottom: 1px solid #eee;
        padding: 0 0 0.35rem 0;
        margin: 0 0 0.25rem 0;
      }

      .input, select {
        display: grid;
        grid-template-columns: minmax(17px, auto) 1fr;
        text-align: center;
        align-items: center;
        gap: 1rem;
        border: 1px solid #ccc;
        padding: 0 1.25rem;
        border-radius: 0.5rem;
        transition: 0.5s ease-in-out;

        input, select {
          border: none;
          outline: none;
          padding: 1rem 0;
          width: 100%;
        }
        select {
          justify-content: start;
        }
        &:hover {
          border: 1px solid #00aaff;
        }
      }
      .select {
        display: flex;
        flex-direction: column;
        p {
          color: #000;
        }
      }

      .console {
        display: flex;
        flex-direction: column;
        overflow-y: auto;

        .console-result {
          display: flex;
          gap: 0.5rem;
          align-items: center;
          margin-bottom: 5px;
          padding-bottom: 5px;
          border-bottom: 1px solid #d0d0d0;

          .success {
            color: #64b247;
          }
          .danger {
            color: #F00;
          }
        }
      }

      .result {
        font-weight: 600;
        overflow-y: auto;

        b {
          color: #00aaff;
        }

        pre {
          background-color: #fff;
          padding: 0;
          border: none;
          overflow: auto;
          color: #555;
        }
      }

      .copy-button {
        position: absolute;
        bottom: 0.5rem;
        right: 0.5rem;
        background-color: #eee;
        color: #777;
        padding: 0.5rem 1rem;
        border: none;
        border-radius: 0.5rem;
        cursor: pointer;
        font-weight: 600;
        transition: 0.3s;

        &:hover {
          background-color: #00aaff;
          color: #fff;
        }
      }

      .button {
        background-color: #00aaff;
        color: #fff;
        padding: 1rem;
        border-radius: 0.5rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
        font-weight: 600;
      }
    }
  }
}

.system-video {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: #f3f3fa;
  border-radius: 0.5rem;

  video {
    border-radius: 0.5rem;
    max-width: 768px;
    width: 100%;
  }
  .disabled {
    display: none;
  }
}

.system-code {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background-color: #f3f3fa;
  border-radius: 0.5rem;
  position: relative;

  .copy-button {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: #eee;
    color: #777;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;

    &:hover {
      background-color: #00aaff;
      color: #fff;
    }
  }

  pre {
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;

    b {
      color: #00aaff;
    }
  }
}

@media screen and (max-width: 1024px) {
  .system-view-rows {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "system system"
      "console result";

    .system-view-body:nth-child(1) {
      grid-area: system;
    }
    .system-view-body:nth-child(2) {
      grid-area: console;
    }
    .system-view-body:nth-child(3) {
      grid-area: result;
    }

    .system-view-body {
      .system-view {
        min-height: 250px;
        height: auto;

        .code-result {
          display: flex;
          flex-direction: row-reverse;
          align-items: center;
          position: relative;
          gap: 1rem;
        }

        .result {
          overflow: auto;
        }

        .copy-button {
          position: relative;
        }
      }
    }
  }
}
@media screen and (max-width: 768px) {
  .system-view-header {
    justify-content: center;
  }
  .system-view-rows {
    grid-template-columns: 1fr;
    grid-template-areas:
      "system"
      "console"
      "result";
  }
}


.mt-1 {
  margin-top: 0.5rem;
}