// com_cpanel

.com_cpanel {

  .content {
    margin-top: 2rem;
  }

  .card {
    p:last-child {
      margin-bottom: 0;
    }

    .list-group,
    .table {
      padding: 0;
      margin-bottom: unset;
      border-top: 1px solid var(--border-color);
    }

  }

  .card-header {
    --card-bg: #{$card-bg};

    a {
      font-weight: normal;
    }

    .btn {
      margin-top: .25em;
      margin-bottom: .25em;
    }
  }

  .card-body {
    padding: 0;
    overflow: hidden;
    background-color: $card-body-bg;
    border-bottom-right-radius: $border-radius;
    border-bottom-left-radius: $border-radius;
  }

  .module-actions {
    order: 1;
    margin-inline-start: auto;

    > * {
      padding: 0;
      color: $module-actions-color;
    }
  }

  .cpanel-add-module {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    width: 100%;
    min-height: 130px;
    padding: 0 1rem;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1;
    color: var(--template-quickicon-color);
    background-color: var(--body-bg);
    border: 1px solid var(--body-bg);
    border-radius: $border-radius;
    transition: all .15s ease-in;

    &:hover,
    &:focus,
    &:active {
      color: #fff;
      text-decoration: none;
      background: var(--cpanel-addmodule-hover);
    }

    > span {
      padding: .25rem 0 1rem;
    }

    .cpanel-add-module-icon {
      font-size: 2rem;
      color: var(--template-quickicon-color);
      margin-inline-end: .5rem;
    }
  }
}

.cpanel-modules {
  .list-group {
    border-top: 1px solid $atum-list-group-border-color;
  }

  .list-group-item {
    --list-group-bg: #{$atum-list-group-bg};

    a:not(.btn) {
      color: rgb(var(--link-color-rgb, $table-link-color));
    }

    a:not(.btn):hover {
      color: rgb(var(--link-color-rgb-hvr));
    }

    a {
      font-weight: normal;
      text-decoration: underline;
    }

    .btn {
      text-decoration: none;
    }

    .btn.btn-info {
      color: $atum-btn-info;
      background: $atum-btn-info-bg;
      border: $atum-btn-info-border;
    }

    .list-group-item a > span {
      &[class^="#{$jicon-css-prefix}-"],
      &[class*=" #{$jicon-css-prefix}-"],
      &[class^="#{$fa-css-prefix}-"],
      &[class*=" #{$fa-css-prefix}-"] {
        display: block;
        padding: .5rem;
        color: rgba(255, 255, 255, .9);
        background: var(--#{$prefix}link-color);
        box-shadow: var(--atum-box-shadow);

        &:hover {
          background: var(--#{$prefix}link-hover-color);
        }
      }
    }
  }

  .list-group-item span.home-image {
    &[class^="#{$jicon-css-prefix}-"],
    &[class*=" #{$jicon-css-prefix}-"],
    &[class^="#{$fa-css-prefix}-"],
    &[class*=" #{$fa-css-prefix}-"] {
      display: inline-block;
      padding: 0;
      margin: 0 .85rem;
      font-size: .9rem;
      color: var(--body-color);
      box-shadow: none;
      transform: scale(1.2);
    }
  }

  h2 {
    margin-bottom: 0;
    font-size: $h4-font-size;
  }

  .mod-custom {
    padding: 1rem;
  }

  .btn:first-child:focus-visible {
    color: var(--btn-active-color);
    background-color: var(--btn-active-bg);
    border-color: var(--btn-active-border-color);
  }
}

.sample-data {
  .list-group-item {
    padding: 1rem;
  }
}

.sample-data__title {
  font-weight: bold;
  color: var(--heading-color);
}

.sample-data__icon {
  width: 1.3rem;
  text-align: center;
}

.sample-data__desc {
  border-inline-start: 4px solid hsl(var(--hue),50%,93%);
  padding-inline-start: 1rem;
  margin-inline-start: 8px;
}

@if $enable-dark-mode {
  @include color-mode(dark) {
    .com_cpanel {
      .card {
        border: 1px solid rgba(255, 255, 255, .1);
        box-shadow: 1px 1px 2px rgba(0, 0, 0, .1);

        .list-group-item:last-child {
          border-bottom-right-radius: var(--border-radius);
          border-bottom-left-radius: var(--border-radius);
        }

        .list-group-item {
          &:hover {
            background: rgba(0,0,0,.1);
          }
        }
      }

      .cpanel-add-module {
        &:hover,
        &:focus,
        &:active {
          background: var(--btn-primary-bg-hvr);
        }
      }
    }
    .sample-data__desc {
      border-inline-start: 4px solid rgba(255, 255, 255, .1);
    }
  }
}
