/* GuestConversations -- the concierge's conversations, as Guest Relations reads them.
 *
 * Every class here is prefixed `gconv-` and owned outright by this module. The row,
 * the row header, the badges, the panel and its scroll are all the design system's
 * (ExpandablePanel, ExpandableRowHeader, Badge, Panel) and are not touched: what this
 * sheet owns is the TRANSCRIPT, which no existing molecule draws.
 *
 * Deliberately NO panel-fill or height rule. Panel.css owns whether a panel fills
 * (the one-panel rule) and this tab renders exactly one panel directly in
 * .tab-content-container, so the chain is already complete. A module-local promotion
 * would fight it. See "Layout, spacing and scroll" in ui-patterns.md.
 *
 * Spacing is gap-only: nothing here carries an external margin.
 */

/* The list of stays. Rows are ExpandablePanels; the parent owns the space between. */
.gconv-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* Under an open row: what can be done about it, then what was said. */
.gconv-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3);
}

/* Triage sits above the transcript and right-aligned -- the primary action rightmost,
   the house rule for any action row. Hidden entirely for a read-only reader. */
.gconv-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

/* ---- the transcript ------------------------------------------------------- */

.gconv-thread {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* A day's divider. The transcript can run a fortnight, and a wall of bubbles with no
   day in it is unreadable. */
.gconv-day {
    align-self: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--bg-layer-1);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-medium);
}

/* One message. The default is the concierge's own voice; the guest's and the hotel's
   are the two that differ, and they differ by SIDE as well as by colour, so the thread
   still reads in monochrome. */
.gconv-msg {
    max-width: 78%;
    align-self: flex-start;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-layer-4);
}

.gconv-msg-guest {
    align-self: flex-end;
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

.gconv-msg-hotel {
    background: var(--bg-layer-2);
}

/* A card the guest was offered. It is not speech, so it does not wear a speech
   bubble's fill -- it wears its outline and carries its outcome beneath. */
.gconv-msg-proposal {
    align-self: stretch;
    max-width: 100%;
    border-style: dashed;
    background: var(--bg-layer-3);
}

/* A request-status bubble: written by the task lifecycle, not by anybody speaking. */
.gconv-msg-status {
    align-self: center;
    max-width: 100%;
    background: var(--bg-layer-2);
    color: var(--text-secondary);
    font-size: var(--text-xs);
}

.gconv-msg-who {
    display: flex;
    gap: var(--space-2);
    align-items: baseline;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-semibold);
}

.gconv-msg-at {
    color: var(--text-muted);
    font-weight: var(--font-weight-normal);
    font-variant-numeric: tabular-nums;
}

/* The words themselves. A guest writes paragraphs; preserve their line breaks rather
   than running a complaint into one block. */
.gconv-msg-text {
    color: var(--text-primary);
    font-size: var(--text-sm);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.gconv-msg-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-1);
}

/* The task or booking reference a card produced -- the thing the hotel looks it up by,
   so it is monospaced and selectable rather than decorative. */
.gconv-ref {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
}

/* ---- Open a case ---------------------------------------------------------- */

/* Who the case is for, above the words. The guest is already known here -- this states
   it rather than asking for it. */
.gconv-case-guest {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-bottom: var(--space-3);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.gconv-case-room {
    color: var(--text-secondary);
}

/* ---- Settings (TLP-1166) --------------------------------------------------- */

/* The four groups of the settings screen. FormSection owns each group's own
   internal spacing; this owns only the space between them. Gap-only, no margins. */
.gconv-settings {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

/* Three independent ticks read as one answer, so they sit tight together rather
   than at the section spacing above. */
.gconv-settings-checks {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* The two caps. Each NumberField is already a one-line control-label-help row. */
.gconv-settings-caps {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ---- a message from the hotel ---------------------------------------------- */

/* Who it goes to, above the box you type it into. The badge carries the weight --
   one guest or the whole house -- and the sentence beside it says what that means. */
.gconv-send-to {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding-bottom: var(--space-3);
}

.gconv-send-who {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}
