/**
 * SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.
 * Copyright (C) 2024 SalesAgility Ltd.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY SALESAGILITY, SALESAGILITY DISCLAIMS THE
 * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License
 * version 3, these Appropriate Legal Notices must retain the display of the
 * "Supercharged by SuiteCRM" logo. If the display of the logos is not reasonably
 * feasible for technical reasons, the Appropriate Legal Notices must display
 * the words "Supercharged by SuiteCRM".
 */

.minimal-table {

  .card {
    box-shadow: 0 .125rem .25rem #00000040;
    border: 1px solid #dee2e6;

    .card-header {
      background-color: #fff;
      color: #534d64;
      font-weight: 700;
      border-top: 3px solid #534d64;
      padding: .5rem .6rem;

      .subpanel-icon {
        svg {
          fill: $main;
          stroke: $main;
        }
      }

      .btn.btn-outline-light {
        border-color: $main;
        color: $main;
      }

      .panel-buttons {

        .dropdown-menu.show {
          background: $white;
          box-shadow: 0 .125rem .25rem #00000040;
          border: 1px solid #dee2e6;
          z-index: 1;

          a:hover {
            background-color: $sky-blue;
            color: $white;
            cursor: pointer;
          }
        }

        .button-group-button {
          border-color: $main;
          color: $main;
        }
      }
    }

    .card-body {
      .card.filter-panel.panel-card {
        box-shadow: none;
        border-left: none;
        border-right: none;
        margin: 0.3em 0.4em 0.5em !important;

        .card-body {
          padding: 0 !important;
          padding-top: 0.5em !important;
          padding-bottom: 0.5em !important;

          .filter-body {
            padding: 0 !important;
          }
        }
      }
    }
  }

  .list-view-tableactions {
    background: none;
    padding: 0;
    margin-left: 0.5rem;
    margin-right: 0.5rem;

    .table-pagination-wrapper {
      min-height: 2.4rem;
      display: flex;
      align-items: center;

      .bulk-action {
        display: flex !important;
        color: $main;
      }
    }

    .load-more-style {
      .load-more {
        color: $main;
        background-color: $white;
        border: none;
      }

      scrm-image {
        display: none;
        fill: $main !important;
        font-size: 60%;
      }

    }

  }

  .table-body-wrapper {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .list-view-table {
    margin-top: 0;
    margin-bottom: 0;

    thead {
      background: none;

      th {
        border-top: 0;
        border-bottom: 1px solid $lightgray;
        padding-top: 0;
        padding-right: 0.45rem;
        padding-left: 0.45rem;
        padding-bottom: 0.25rem;
      }
    }

    tr {
      padding-left: 0.5rem;
      padding-right: 0.5rem;
      border-bottom: 1px solid $lightgray;
    }

    td:first-child, th:first-child {
      padding-left: 1rem;
    }

    td:last-child, th:last-child {
      padding-right: 1rem;
    }

    .primary-table-header {
      background: none;
      color: $main;
    }

    .cdk-column-line-actions {
      width: auto;

      .listview-actions {
        .icon-bar-block {
          display: flex;
          justify-content: flex-end;
        }
      }
    }
  }

  .pagination-button {
    border: none;
    margin: 0 0.1em;
    border-radius: .2em;

    .pagination-icons {
      fill: $main;
      margin: 0.1em;

      svg {
        height: 2em;
        vertical-align: bottom;
      }
    }
  }

  .sort-icon {
    fill: $midnight-blue;
  }

  .pagination-count {
    vertical-align: text-bottom;
    margin: 0.2em 0.3em 0;
  }

  table.table {
    tbody {
      tr:nth-child(odd) {
        background: $off-white;
      }
    }
  }
}

.sub-panels .minimal-table .card .card-header {
  height: 100%;
}
