/* Review (modules/review): the client file's boxes (pages/client.css) with the list folded by partner and the open item
   beside it from 992px; below that the list shows about three items and scrolls inside its box, the open item under it. */

/* The list: Summaries and Orders, each partner a fold with its count; the items as rows, the open one pale blue. */
.review .client__group {
  display: block;
  padding-inline: 0;
}

.review .client__sets,
.review .client__reports {
  display: block;
  overflow-x: visible;
}

.review__fold + .client__group {
  margin-top: var(--sp-2);
}

.review__fold-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-small);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  border-bottom: var(--border-1) solid var(--c-line);
}

.review__fold-head::-webkit-details-marker { /* Safari: hide its own triangle */
  display: none;
}

.review__fold-count {
  padding: 0 var(--sp-1);
  font-size: var(--fs-xxs);
  color: var(--c-accent-text);
  background-color: var(--c-chip);
  border-radius: var(--radius-pill);
}

.review__fold-icon {
  margin-left: auto;
  font-size: var(--fs-xs);
  transition: transform var(--duration-fast) var(--ease);
}

[open] > summary .review__fold-icon {
  transform: rotate(180deg);
}

.review__fold .client__reports {
  padding-block: var(--sp-1);
}

.review .client__report {
  width: 100%;
  white-space: normal;
}

.review .client__report:not([aria-current]) {
  background-color: transparent;
  border-color: transparent;
}

.review .client__path .client__list {
  max-height: var(--review-list-h);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* The open item: Request with its (i), whose words open under the heading across the box. */
.review .client__part--tag {
  position: relative; /* holds the (i)'s words */
}

.review__request {
  display: inline-flex;
  align-items: center;
}

.review__help .tip__text {
  top: 100%;
  right: 0;
  left: 0;
}

/* An order's products: name and size, then the dose and how many on rows of their own; from 576px beside the name. */
.review__product {
  display: block;
}

.review__product dd {
  display: grid;
  gap: var(--sp-1);
  margin-top: var(--sp-2);
}

.review__product dd i {
  color: var(--c-text-muted);
}

/* The note for the associate doctor: folded under a heading like the parts', with its line above it. */
.review__note {
  border-bottom: var(--border-1) solid var(--c-line);
}

.review__note-head {
  display: flex;
  align-items: center;
  padding: var(--sp-5) 0 var(--sp-2);
  font-size: var(--fs-xxs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--c-anthracite);
  list-style: none;
  cursor: pointer;
}

.review__note-head::-webkit-details-marker { /* Safari: hide its own triangle */
  display: none;
}

.review__note-body {
  display: grid;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
}

.review__note-save {
  display: flex;
  justify-content: flex-end;
}

/* The buttons: under a line; phones one under the other, full width; from 576px in a row, the first on the left. */
.review__foot {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding: var(--sp-4) 0;
  border-top: var(--border-1) solid var(--c-line);
}

.review__note + .review__foot {
  margin-top: 0;
  border-top: 0;
}

@media (min-width: 576px) {
  .review__product {
    display: grid;
  }

  .review__product dd {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-1) var(--sp-4);
    margin-top: 0;
  }

  .review__foot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
  }

  .review__left {
    margin-right: auto;
  }
}

/* The two boxes stack until 992px (client.css puts them side by side from 576px), then sit side by side as there. */
@media (min-width: 576px) {
  .review .client__overview {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .review .client__path {
    grid-row: auto;
  }
}

@media (min-width: 992px) {
  .review .client__overview {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    grid-template-rows: auto auto auto 1fr;
  }

  .review .client__path {
    grid-row: 1 / -1;
  }

  .review .client__path .client__list {
    max-height: none;
  }
}
