/* The member's Consultations page (modules/consultations): panels (components/panel.css) whose buttons sit inside,
   bottom right, instead of on the bottom edge. */

/* --- Every panel on this page: a column, its button pushed to the bottom right --- */
.consult {
  row-gap: var(--sp-6); /* no button on the edge, so the rows can sit closer */
}

.consult .panel {
  display: flex;
  flex-direction: column;
  padding: var(--sp-5) var(--sp-6);
}

.consult .panel__save {
  position: static;
  align-self: flex-end;
  margin-top: auto;
  translate: none;
}

.consult__meta {
  display: block;
  font-size: var(--fs-small);
  color: var(--c-text-muted);
}

/* --- Your consultant: a photo space down the whole left side, the words beside it --- */
.consult .consult__person {
  flex-direction: row;
  padding: 0;
  overflow: hidden;
}

.consult__photo {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: var(--sp-24);
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  color: var(--c-text-muted);
  background-color: var(--c-surface);
}

@media (min-width: 576px) {
  .consult__photo {
    width: var(--sp-32);
  }
}

.consult__about {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
  padding: var(--sp-5) var(--sp-6);
}

.consult__name {
  display: block;
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--c-heading);
}

/* --- Next consultation: a date chip beside the time --- */
.consult__when {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.consult__date {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: var(--sp-16);
  padding-block: var(--sp-2);
  line-height: var(--lh-heading);
  color: var(--c-accent-text);
  background-color: var(--c-accent);
  border: var(--border-1) solid var(--c-accent-border);
  border-radius: var(--radius-2);
}

.consult__date small {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.consult__date b {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 500;
}

/* --- Your consultations: each a row that opens to its summary (the newest open) --- */
.consult__list > li + li {
  border-top: var(--border-1) solid var(--c-line);
}

.consult__summary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  cursor: pointer;
  list-style: none;
}

/* Safari still draws its own triangle without this. */
.consult__summary summary::-webkit-details-marker,
.consult__earlier summary::-webkit-details-marker {
  display: none;
}

.consult__summary .bi-chevron-down {
  color: var(--c-accent-text);
  transition: rotate var(--duration-fast) var(--ease);
}

.consult__summary[open] .bi-chevron-down {
  rotate: 180deg;
}

.consult__text {
  margin-bottom: var(--sp-3);
  padding: var(--sp-4);
  font-size: var(--fs-small);
  background-color: var(--c-panel);
  border-radius: var(--radius-2);
}

/* --- Messages: across the whole row, earlier ones folded away, the write box beside Send --- */
.consult__messages {
  grid-column: 1 / -1;
}

.consult__earlier summary {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  width: max-content;
  margin-inline: auto;
  font-size: var(--fs-small);
  color: var(--c-accent-text);
  cursor: pointer;
  list-style: none;
}

.consult__earlier[open] summary {
  margin-bottom: var(--sp-4);
}

.consult__earlier[open] .bi-chevron-down {
  rotate: 180deg;
}

/* The box is one line high, the same height as Send beside it. */
.consult__write {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.consult__write .field {
  flex: 1;
}

.consult__input.field__input {
  min-height: var(--field-h);
  height: var(--field-h);
}

.consult__send {
  min-height: var(--field-h);
}
