/* =====================================================================
   Detail pages built on the framework's detail hub (detail-hub.css):
   per-entity tab content that isn't a grid.
   ===================================================================== */

/* ---- Team / Player › Profile---------------------------------------------- */
.entity-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 24px;
    align-items: start;
}

.entity-profile__facts dl {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px 16px;
    margin: 0 0 12px;
}

.entity-profile__facts dt {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bo-text-muted);
}

.entity-profile__facts dd {
    margin: 0;
    font-size: 0.875rem;
    white-space: pre-line;
}

@media (max-width: 719.98px) {
    .entity-profile {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Counts in a detail strip's summary line read as numbers first. */
.bo-hub-meta strong {
    color: var(--bo-text);
    font-variant-numeric: tabular-nums;
}

.user-profile__avatar.mud-avatar {
    width: 120px;
    height: 120px;
    font-size: 2.25rem;
}

.entity-profile__id {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    word-break: break-all;
}

/* ---------------------------------------------------------------------
   Order detail — payments and the gateway exchange timeline
   --------------------------------------------------------------------- */
.order-payments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.order-payment {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius-lg);
}

.order-payment__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.order-payment__provider {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--bo-text-muted);
}

.order-payment__note {
    font-size: 0.8rem;
    color: var(--bo-text-muted);
}

    .order-payment__note.is-warn {
        color: var(--mud-palette-warning);
    }

.order-payment__refs {
    padding-top: 6px;
    border-top: 1px solid var(--bo-border);
}

.order-payment__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.order-ref {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 2px;
    font-size: 0.8rem;
}

.order-ref__label {
    color: var(--bo-text-muted);
}

.order-ref__value {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    word-break: break-all;
}

.order-timeline__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--bo-text-muted);
}

.order-payload {
    max-height: 320px;
    margin: 0;
    padding: 8px;
    overflow: auto;
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.bo-gw-timeline.mud-timeline {
    padding: 0;
    gap: 0;
}

.bo-gw-timeline .mud-timeline-item {
    min-height: unset;
    padding-bottom: 2px;
}

    .bo-gw-timeline .mud-timeline-item:last-child {
        padding-bottom: 0;
    }

.bo-gw-timeline .mud-timeline-item-content {
    padding-top: 0;
    padding-bottom: 0;
}

.bo-gw-timeline .mud-expand-panel {
    background: transparent;
}

.bo-gw-timeline .mud-expand-panel-header {
    min-height: unset;
    padding: 2px 8px;
}

.bo-gw-timeline .mud-expand-panel-content {
    padding: 4px 8px 8px;
}

/* ---------------------------------------------------------------------
   Platform lists — a thumbnail or badge beside a row's title
   --------------------------------------------------------------------- */
.promo-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-cell__thumb {
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: var(--bo-radius);
    object-fit: cover;
    background: var(--bo-surface-muted);
}

.bo-table-grid .bo-cell-sub.is-warn {
    color: var(--mud-palette-warning);
}

/* ---------------------------------------------------------------------
   Support conversation — the thread is the page; facts sit beside it
   --------------------------------------------------------------------- */
.support-ticket {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
    align-items: start;
}

.support-ticket__facts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .support-ticket__facts .entity-profile__facts dl {
        grid-template-columns: 96px minmax(0, 1fr);
    }

.support-admin-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 4px;
}

.support-bubble {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--bo-surface-muted);
}

    .support-bubble.is-admin,
    .support-bubble.is-ai,
    .support-bubble.is-note {
        margin-left: auto;
    }

    .support-bubble.is-admin {
        background: var(--bo-hub-ok-soft);
    }

    .support-bubble.is-ai {
        background: var(--bo-primary-soft);
    }

    .support-bubble.is-note {
        border: 1px dashed var(--bo-hub-warn);
        background: var(--bo-hub-warn-soft);
    }

.support-bubble__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    font-size: 0.75rem;
}

.support-bubble__note {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--bo-hub-warn);
}

.support-bubble__time {
    margin-left: auto;
    color: var(--bo-text-muted);
}

.support-bubble__body {
    font-size: 0.875rem;
    white-space: pre-wrap;
}

.support-ticket__composer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--bo-border);
}

.support-ticket__composer-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.support-ticket__hint {
    font-size: 0.75rem;
    color: var(--bo-text-muted);
}

@media (max-width: 959.98px) {
    .support-ticket {
        grid-template-columns: minmax(0, 1fr);
    }
}

.support-ticket__spacer {
    flex: 1;
}

/* Search index: workspace and projector pickers with the index actions, in one row above the documents. */
.search-index__controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.search-index__spacer {
    flex: 1;
}
