/* The transcript scrolls independently of the portrait area and composer. */
.roundtable-room {
  --roundtable-width: 54rem;
  height: 100svh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.roundtable-room .roundtable-shade {
  background: linear-gradient(
    180deg,
    rgba(20, 18, 12, .36),
    rgba(20, 18, 12, .05) 31%,
    rgba(20, 18, 12, .73) 95%
  );
}

.roundtable-header {
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 76px;
  padding-block: 1rem;
}

.roundtable-header .button { justify-self: start; }

.roundtable-stage {
  grid-row: 2;
  z-index: 2;
  width: min(var(--roundtable-width), calc(100% - 2rem));
  min-height: 0;
  margin: 0 auto;
  padding: .5rem .5rem 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-color: #d7bc79 rgba(25, 30, 19, .35);
}

.roundtable-transcript {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .875rem;
  margin: 0 auto;
  padding: 0 0 .5rem;
}

.roundtable-room .guide-turn,
.roundtable-room .user-interruption {
  max-width: 100%;
  padding: 1rem 1.25rem;
}

.roundtable-room .guide-turn { width: 100%; }
.roundtable-room .user-interruption { margin: 0 0 0 auto; }

.roundtable-composer {
  position: relative;
  grid-row: 3;
  z-index: 3;
  padding: .5rem clamp(1rem, 5vw, 4rem) .75rem;
  background: linear-gradient(180deg, rgba(27, 27, 17, .35), rgba(27, 27, 17, .96) 28%);
}

.roundtable-composer label {
  max-width: var(--roundtable-width);
  margin: 0 auto;
  padding: .55rem .875rem;
}

.roundtable-composer textarea {
  height: 3.5rem;
  min-height: 0;
  resize: none;
  overflow: auto;
}

.roundtable-composer .roundtable-composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  max-width: var(--roundtable-width);
  margin: .4rem auto 0;
}

.roundtable-composer-actions .button {
  min-height: 2.5rem;
  padding: .55rem 1rem;
  flex: none;
}

.roundtable-latest {
  grid-column: 3;
  justify-self: end;
  border: 1px solid rgba(255, 241, 196, .62);
  border-radius: 999px;
  padding: .5rem .75rem;
  background: #263b28;
  color: #fff8e6;
  box-shadow: 0 8px 22px rgba(10, 10, 7, .35);
  cursor: pointer;
}

.roundtable-latest[hidden],
.roundtable-feedback .reaction[hidden],
.roundtable-feedback:has(.roundtable-status:empty) {
  display: none;
}

.roundtable-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .625rem;
  max-width: var(--roundtable-width);
  margin: 0 auto .25rem;
  padding: .125rem .75rem;
  border-radius: .5rem;
  background: rgba(36, 44, 28, .96);
}

.roundtable-feedback .reaction { flex: none; background: #543724; }
.roundtable-composer .button:disabled { opacity: .62; cursor: default; transform: none; }

.roundtable-composer textarea:focus-visible,
.roundtable-stage:focus-visible,
.roundtable-room .reaction:focus-visible,
.roundtable-latest:focus-visible {
  outline: 2px solid #b3853f;
  outline-offset: 2px;
}

/* Separate the reading area from the four faces on landscape desktop screens. */
@media (min-width: 701px) and (min-height: 600px) and (min-aspect-ratio: 3/2) {
  .roundtable-room {
    grid-template-rows: 43svh minmax(0, 1fr) auto;
    background-position: center -14svh;
    background-color: #29271c;
  }

  .roundtable-header { align-self: start; }
}

@media (max-width: 700px) {
  .roundtable-header { min-height: 64px; gap: .375rem; padding: .75rem 1rem; }
  .roundtable-header .button, .roundtable-latest { padding: .5rem; }
  .roundtable-stage { width: calc(100% - 1.25rem); padding-top: .25rem; }
  .roundtable-room .guide-turn, .roundtable-room .user-interruption { padding: .875rem 1rem; }
  .roundtable-composer { padding: .5rem .75rem .75rem; }
  .roundtable-composer .roundtable-composer-actions { gap: .5rem; }
}
