/* =========================================================
   WCR Overview Table
   Basic-Styling
   - simple on purpose
   - easy to override via child-theme (css)
   - variants determine css-variables
   ========================================================= */

.wcr-overview-table {
  --wcr-ot-margin-top: 2.25rem;
  --wcr-ot-margin-bottom: 2.75rem;

  --wcr-ot-padding: 0;
  --wcr-ot-bg: transparent;
  --wcr-ot-border: 0;
  --wcr-ot-radius: 0;
  --wcr-ot-shadow: none;

  --wcr-ot-title-margin-bottom: 0.75rem;
  --wcr-ot-title-line-height: 1.2;
  --wcr-ot-title-font-weight: 600;

  --wcr-ot-table-max-width: 720px;

  --wcr-ot-key-width: 40%;
  --wcr-ot-key-opacity: 0.85;
  --wcr-ot-key-font-weight: inherit;

  --wcr-ot-cell-padding-y: 0.625rem;
  --wcr-ot-cell-padding-x: 0.75rem;

  --wcr-ot-row-border: 1px solid rgba(0, 0, 0, 0.08);

  --wcr-ot-list-margin-y: 0;
  --wcr-ot-list-padding-left: 1.125rem;

  --wcr-ot-kv-spacing: 0.3rem;
  --wcr-ot-kv-key-font-weight: 600;

  display: block;
  width: 100%;
  max-width: 100%;
  margin: var(--wcr-ot-margin-top) 0 var(--wcr-ot-margin-bottom);
  padding: var(--wcr-ot-padding);
  text-align: left;
  background: var(--wcr-ot-bg);
  border: var(--wcr-ot-border);
  border-radius: var(--wcr-ot-radius);
  box-shadow: var(--wcr-ot-shadow);
}

/* =========================================================
   Variants
   ========================================================= */

.wcr-overview-table--tight {
  --wcr-ot-margin-top: 1.5rem;
  --wcr-ot-margin-bottom: 1.75rem;
  --wcr-ot-title-margin-bottom: 0.5rem;
}

.wcr-overview-table--spacious {
  --wcr-ot-margin-top: 3.5rem;
  --wcr-ot-margin-bottom: 3.75rem;
}

.wcr-overview-table--no-spacing {
  --wcr-ot-margin-top: 0;
  --wcr-ot-margin-bottom: 0;
}

.wcr-overview-table--card {
  --wcr-ot-padding: 1.5rem 1.75rem;
  --wcr-ot-bg: #f6f5f1;
  --wcr-ot-border: 1px solid rgba(0, 0, 0, 0.06);
  --wcr-ot-radius: 0.875rem;
}

.wcr-overview-table--full {
  --wcr-ot-table-max-width: none;
}

.wcr-overview-table--narrow {
  --wcr-ot-table-max-width: 560px;
}

/* =========================================================
   Title
   ========================================================= */

.wcr-overview-table__title {
  margin: 0 0 var(--wcr-ot-title-margin-bottom) 0;
  line-height: var(--wcr-ot-title-line-height);
  font-weight: var(--wcr-ot-title-font-weight);
}

/* =========================================================
   Table
   ========================================================= */

.wcr-overview-table__table {
  width: 100%;
  max-width: var(--wcr-ot-table-max-width);
  margin: 0 auto 0 0;
  border-collapse: collapse;
}

/* =========================================================
   Rows / Cells
   ========================================================= */

.wcr-overview-table__key,
.wcr-overview-table__value {
  vertical-align: top;
  padding: var(--wcr-ot-cell-padding-y) var(--wcr-ot-cell-padding-x);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wcr-overview-table__key {
  width: var(--wcr-ot-key-width);
  text-align: left;
  opacity: var(--wcr-ot-key-opacity);
  font-weight: var(--wcr-ot-key-font-weight);
}

.wcr-overview-table__value {
  text-align: left;
}

.wcr-overview-table__row + .wcr-overview-table__row .wcr-overview-table__key,
.wcr-overview-table__row + .wcr-overview-table__row .wcr-overview-table__value {
  border-top: var(--wcr-ot-row-border);
}

/* =========================================================
   Lists inside values
   ========================================================= */

.wcr-overview-table__list {
  margin: var(--wcr-ot-list-margin-y) 0;
  padding-left: var(--wcr-ot-list-padding-left);
}

.wcr-overview-table__list li + li {
  margin-top: 0.2rem;
}

/* =========================================================
   Key/Value-blocks
   ========================================================= */

.wcr-overview-table__kv + .wcr-overview-table__kv {
  margin-top: var(--wcr-ot-kv-spacing);
}

.wcr-overview-table__kvk {
  font-weight: var(--wcr-ot-kv-key-font-weight);
}

.wcr-overview-table__kvv {
  display: inline;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {
  .wcr-overview-table {
    --wcr-ot-table-max-width: 100%;
    --wcr-ot-cell-padding-y: 0.5rem;
    --wcr-ot-cell-padding-x: 0.375rem;
    --wcr-ot-key-width: 38%;
  }
}

@media (max-width: 520px) {
  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) {
    --wcr-ot-padding: 0;
    --wcr-ot-key-width: auto;
  }

  .wcr-overview-table--card:not(.wcr-overview-table--layout-adaptive) {
    --wcr-ot-padding: 1rem;
  }

  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__table,
  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__table tbody,
  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__table tr,
  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__table th,
  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__row + .wcr-overview-table__row .wcr-overview-table__key,
  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__row + .wcr-overview-table__row .wcr-overview-table__value {
    border-top: 0;
  }

  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__row {
    padding: 0.7rem 0;
    border-top: var(--wcr-ot-row-border);
  }

  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__row:first-child {
    border-top: 0;
  }

  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__key,
  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__value {
    padding-left: 0;
    padding-right: 0;
  }

  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__key {
    padding-bottom: 0.2rem;
    opacity: 1;
  }

  .wcr-overview-table:not(.wcr-overview-table--layout-adaptive) .wcr-overview-table__value {
    padding-top: 0;
  }
}