/**
 * SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.
 * Copyright (C) 2021 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".
 */
.aor-tab-content {
  background-color: $panel-bg;
}

#report-editview-footer {
  width: 100%;
}

#detailpanel_fields_select {
  border-right: 2px solid $panel-border-bg;
  display: inline-block;
  padding: 8px;
  width: 20%;
}

#detailpanel_fields_display {
  display: inline-block;
  padding: 8px;
  width: 75%;
}

.aor_dragbox {
  overflow: scroll;
  height: 250px;
}

#report-editview-footer .tab-togglers {
  margin-left: 19.6%;
  margin-top: 1.5em;
}

#report-editview-footer .tab-toggler.active .button {
  background-color: $danger-btn-bg;
}

#report-editview-footer .parentheses-btn {
  display: block;
}

#report-editview-footer .condition-sortable-handle {
  cursor: move;
}

#report-editview-footer .parenthesis-line strong {
  font-size: 18px
}

#report-editview-footer .drop-area.highlighted {
  background-color: $aor-droparea;
}

.noGraphDataPoints {
  padding: 10px;
}

.rgraph_chart_tooltips_css {
  font-family: 'Lato', Arial;
}

.aor-tab-content {
  #group_display_table {
    margin-bottom: 1em;
    margin-top: 1em;
  }
    #fieldLines_head, #aor_conditionLines_head, #chartHead {
      td {
        background-color: $table-header-bg;
        color: $action-tab-color;
        height: 32px;
        font-weight: 700;
      }
      td:first-of-type {
        border-top-left-radius: 4px;
      }

      td:last-of-type {
        border-top-right-radius: 4px;
      }
    }

  #fieldLines {
    tbody {
      tr {
        height: 64px;

        td {
          background-color: $main-alternate-bg;

          [type=text] {
            margin-right: 4px;
          }
        }

        td:first-of-type {
          padding-left:  4px;
          .button {
            padding: 6px 6px 18px 6px;
            line-height: 10px;
            height: 0px;
            font-size: 32px;
          }
        }
      }
    }

    tbody:nth-of-type(2n) {
      tr {
        td {
          background-color: $main-bg;
        }
      }
    }
  }

  #aor_conditionLines {
    .logic-select {
      margin-right: 4px;
    }

    tbody {
      tr {
        height: 64px;

        td {
          background-color: $main-alternate-bg;

          [type=text] {
            margin-right: 4px;
          }
        }

        td:first-of-type {
          padding-left:  4px;
          .button {
            padding: 6px 6px 18px 6px;
            line-height: 10px;
            height: 0px;
            font-size: 32px;
          }
        }
      }
    }

    tbody {
      tr:nth-of-type(2n) {
        td {
          background-color: $main-bg;
        }
      }
    }

    #aor_conditionLines_head {
      td:nth-of-type(2),
      td:last-of-type {
        padding-right: 8px;
      }
    }

  }

  #detailpanel_charts {

    tbody {
      tr {
        height: 64px;
        td {
          background-color: $main-alternate-bg;

          [type=text] {
            margin-right: 4px;
          }

          select {
            margin-right: 4px;
          }
        }

        td:first-of-type {
          padding-left:  4px;
          .removeChartButton {
            margin-right: 4px;
            padding: 6px 6px 18px 6px;
            line-height: 10px;
            height: 0px;
            font-size: 32px;
          }
        }
      }
    }

    tbody {
      tr:nth-of-type(2n) {
        td {
          background-color: $main-bg;
        }
      }
    }
  }
}

#aor_condition_parenthesis_table {
  border: none;border: none;
  margin-bottom: 8px;

  tbody {
    border: none;border: none;
    tr {
      border: none;border: none;
    }
  }


  #aor_condition_parenthesis_btn {
    font-weight: 700;
  }
}

.parentheses-btn {
  border: 1px solid transparent;
  border-radius: $border-radius-base;
  background-color: $info-btn-bg;
  color: $default-btn-color;
  font-weight: 700;
}

.parentheses-btn:hover {
  background-color: $info-btn-bg-hover;
  cursor: grab;
}

.parentheses-btn .condition-sortable-handle {
  padding: 5px 10px 5px 10px
}


.jqtree-tree .jqtree-title {
  color: $link-color;
}

#detailpanel_report {
  .list-view-rounded-corners {
    margin: 0px;
  }

  .list-view-rounded-corners > table th:first-of-type {
    border-top-left-radius: 0;
  }

  .list-view-rounded-corners > table th:last-of-type {
    border-top-right-radius: 0;
  }

  .table-responsive {
    border-collapse: collapse;
    border-radius: 0;
  }

  .totalReportRow {
    border-top: 1px solid $list-view-header-bg;
    border-bottom: 1px solid $list-view-header-bg;
  }

  .totalReportRow td {
    padding: 5px 5px;
    font-size: 13px;
    font-weight: bold;
    background-color: $aor-total;
  }
}
