@charset "utf-8";
@use "../../util";
@use "../../base/colors";
@use "../../base/lengths";

// Metatable
div.metatable > dl {
  margin-right: lengths.$right-view-distance;
  margin-top:   lengths.$border-size;

  > div {
    border-color: colors.$dark-orange;

    > * {
      padding: .2em;
    }

    > dt {
      background: colors.$darker-orange;
      color:      colors.$nearly-white;
      width:      12.5em;
    }

    > dd {
      background-color: colors.$light-orange;
      cursor: pointer;


      &.notinindex {
        background-color: colors.$ids-grey-2 !important;
        cursor: default;
      }

      &.metakeyvalues {

        > div {
          padding: 0;
          text-indent: -5pt;
          margin-left: 6pt;
          padding-left: 4pt;
          border-radius: lengths.$standard-border-radius;
          margin-bottom: 2pt;

          &::before {
            content: "\2022\00A0";
            color:   colors.$dark-orange;
            width: 5pt;
            display: inline-block;
          }
        }
      }

      // equal to td.chosen
      &.chosen,
      > div.chosen {
        background-color: colors.$light-green !important;
        color:            colors.$nearly-white;
      }

      &[data-type="type:store"],
      &[data-type="type:attachement"],
      &.notinindex {
        background-color: colors.$middle-orange;
        cursor:           default;

        a {
          color: inherit;
        }
      }
    }
  }

  // This is a temporary feature to disable
  // corpusByMatch assistant. See corpusByMatch.js
  // for reasons.
  &.cbm-disabled > div > dd {
    cursor: default !important;
  }
}
