@import '../style/variable';
@import '../style/mixin';

#resources {
  @include overflow-auto(y);
  padding: 10px;
  font-size: 14px;
  .section {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    .content {
      @include overflow-auto(y);
      max-height: 400px;
    }
    &.warn {
      border: 1px solid var(--console-warn-border);
      .title {
        background: var(--console-warn-background);
        color: var(--console-warn-foreground);
      }
    }
    &.danger {
      border: 1px solid var(--console-error-border);
      .title {
        background: var(--console-error-background);
        color: var(--console-error-foreground);
      }
    }
  }
  .title {
    @include right-btn();
    padding: $padding;
    color: var(--primary);
    background: var(--darker-background);
  }
  .link-list {
    font-size: $font-size-s;
    color: var(--foreground);
    li {
      padding: 10px;
      word-break: break-all;
      a {
        color: var(--link-color) !important;
      }
    }
  }
  .image-list {
    @include clear-float();
    color: var(--foreground);
    font-size: $font-size-s;
    display: flex;
    flex-wrap: wrap;
    padding: $padding !important;
    li {
      flex-grow: 1;
      cursor: pointer;
      &.image {
        height: 100px;
        font-size: 0;
      }
      overflow-y: hidden;
      img {
        height: 100px;
        min-width: 100%;
        object-fit: cover;
      }
    }
  }
  table {
    color: var(--foreground);
    border-collapse: collapse;
    width: 100%;
    font-size: $font-size-s;
    tr:nth-child(even) {
      background: var(--contrast);
    }
    td {
      padding: 10px;
      word-break: break-all;
      &.key {
        @include overflow-auto(x);
        white-space: nowrap;
        max-width: 120px;
      }
      &.control {
        padding: 0;
        font-size: 0;
        width: 40px;
        .icon-delete {
          cursor: pointer;
          color: var(--primary);
          font-size: $font-size;
          display: inline-block;
          width: 40px;
          height: 40px;
          text-align: center;
          line-height: 40px;
          transition: color $anim-duration;
          &:active {
            color: var(--accent);
          }
        }
      }
    }
  }
}
