// Copyright 2020 Energinet DataHub A/S
//
// Licensed under the Apache License, Version 2.0 (the "License2");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
watt-description-list {
  display: block;

  &.watt-description-list-flow {
    dl {
      display: grid;
      gap: var(--watt-space-ml);
      grid-template-columns: repeat(var(--watt-description-list-groups-per-row, 3), 1fr);

      dd {
        margin: 0;
      }

      .force-new-row {
        grid-column-start: 1;
      }
    }
  }
  &.watt-description-list-stack {
    dl {
      display: grid;
      gap: var(--watt-space-m);
      grid-template-columns: 1fr;

      dd {
        margin: 0;
        flex: 1;
      }

      dt {
        width: 240px;
      }

      div {
        display: flex;
        align-items: baseline;
      }
    }
  }
  &.watt-description-list-stack.item-separators {
    dl {
      div {
        border-bottom: 1px solid var(--watt-color-neutral-grey-300);
        padding-bottom: var(--watt-space-m);
      }
    }
  }
  &.watt-description-list-compact {
    dl {
      display: grid;
      gap: var(--watt-space-m) var(--watt-space-l);
      grid-template-columns: max-content max-content;

      dd {
        margin: 0;
      }

      div {
        display: contents;
      }
    }
  }
}
