.pgadmin-explain-details {
  min-width: 200px;
  max-width: 300px;
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  right: 0.25rem;
  border-color: $popover-border-color;
  box-shadow: $popover-box-shadow;
  word-break: break-all;
  display: flex;
  flex-direction: column;
  z-index: 99;

  .details-header {
    padding: 0.25rem;
    font-weight: unset;
  }

  .details-body {
    overflow: auto;
    flex-grow: 1;
  }
}


.sql-editor-explain {
  .backform-tab {
    .tab-content {
      bottom: 0.5rem;
      background-color: $color-bg;

      div[data-explain-tabpanel=graphical] {
        .btn-group {
          position: absolute;
          top: 4px;
          margin-left: 4px;

          &.pg-explain-download-area.btn-group {
            left: 90px;
          }

          &.pg-explain-stats-area {
            right: 4px;
          }

          .btn {
            font-size: 0.75rem;
          }

          *:hover {
            opacity: 1;
          }
        }
      }
    }
  }
}

div.tab-pane[data-explain-tabpanel=table] {

  border-bottom: $panel-border;

  td.pga-ex-exclusive-2,
  td.pga-ex-inclusive-2,
  td.pga-ex-rowsx-2 {
    background-color: $explain-sev-2-bg;
    color: $explain-sev-2-color;
  }

  td.pga-ex-exclusive-3,
  td.pga-ex-inclusive-3,
  td.pga-ex-rowsx-3 {
    background-color: $explain-sev-3-bg;
    color: $explain-sev-3-color;
  }

  td.pga-ex-exclusive-4,
  td.pga-ex-inclusive-4,
  td.pga-ex-rowsx-4 {
    background-color: $explain-sev-4-bg;
    color: $explain-sev-4-color;
  }

  .pg-ex-subplans {
    position: absolute;
    margin-left: -20px;
    margin-top: 3px;
    font-weight: bold;
  }

  table {
    tr {
      &[data-collapsed=true] {
        td {
          border-bottom: $table-hover-border;
          border-bottom-style: dotted !important;
          border-bottom-width: medium !important;
        }
      }
      td {
        li {
          font-size: small;
          opacity: 0.75;
          overflow-wrap: break-word;
          word-break: break-all;
          overflow: visible;
          white-space: pre-wrap;
          word-wrap: break-word;
        }
        &.pg-ex-highlighter {
          color: $color-fg;
        }
      }
      &.pga-ex-collapsible {
        td {
          &.clickable {
            cursor: pointer;
          }
        }
      }
    }
  }
}

div.tab-pane[data-explain-tabpanel=statistics] {
  .badge {
    cursor: initial;
  }
  table[for=per_table] {
    tr {
      &.table {
        background-color: $color-gray-lighter;

        td:first-child {
          font-weight: bold !important;
        }
      }
      &.node {
        td.name {
          padding-left: 30px;
        }
      }
    }
  }
}
