/* ==========================================================================
   Review Record — review show page layout
   Card-based two-column layout: details + important notes on the left,
   quick actions + client details on the right, tabulation below.
   ========================================================================== */
.review-record {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Cards themselves are shared with the other records (see .record-card in
   record_page.css); what follows is what a review puts inside them. */

/* == Layout grid == */
.review-record__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.review-record__column {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

@media (max-width: 1024px) {
  .review-record__grid {
    grid-template-columns: 1fr;
  }
}

/* == Detail grid == */
.review-record__details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.review-record__details--stacked {
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.review-record__details-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.review-record__detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.review-record__detail-label {
  font-size: var(--font-size-small);
  font-family: var(--font-family-bold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--label-letter-spacing);
  color: var(--color-text-muted);
}

.review-record__detail-value {
  margin: 0;
  font-size: var(--font-size-medium);
  color: var(--color-text);
  overflow-wrap: anywhere;
}

/* A date the record is behind on, coloured as the table colours its row: amber
   for a pack still to come, red for one that went out late. */
.review-record__detail-value--warning {
  color: var(--color-warning);
  font-family: var(--font-family-bold);
  font-weight: 600;
}

.review-record__detail-value--danger {
  color: var(--color-danger);
  font-family: var(--font-family-bold);
  font-weight: 600;
}

/* == Important notes == */
.review-record__hint {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-medium);
  color: var(--color-text-muted);
}

.review-record__textarea-wrapper {
  position: relative;
}

.review-record__textarea {
  width: 100%;
  min-height: 120px;
  padding: var(--space-3);
  padding-bottom: var(--space-10);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-sunken);
  font-family: var(--font-family-base);
  font-size: var(--font-size-medium);
  color: var(--color-text);
  resize: vertical;
  transition: border-color var(--transition-fast), background-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

/* The warning composer in the side column: a warning is a line or two, written
   once and read from the banner, so the box need not be a page deep. */
.review-record__textarea--compact {
  min-height: 76px;
  padding-bottom: var(--space-8);
  font-size: var(--font-size-small);
}

.review-record__textarea:hover {
  border-color: var(--color-border-strong);
}

.review-record__textarea:focus {
  outline: none;
  background-color: var(--color-surface);
  border-color: var(--color-primary-green);
  box-shadow: var(--focus-ring);
}

.review-record__update-button {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
}


/* Why a pack date is what it is, under the date itself: set by hand, or the
   firm's own lead time rather than the practice's standard (see
   reviews/show/_details). Quiet — it explains a figure, it is not one. */
.review-record__detail-note {
  margin-top: var(--space-1);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  font-style: italic;
}
