/* In-app chat per match. Mobile-first met grote touch-targets. */
.fs-chat-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem;
}

.fs-chat-page__title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.fs-chat {
    display: flex;
    flex-direction: column;
    border: 1px solid #d9dee8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.fs-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.9rem;
    background: #1f2a44;
    color: #fff;
}

.fs-chat__title {
    font-weight: 600;
}

.fs-chat__refresh {
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
}

.fs-chat__refresh:hover {
    background: rgba(255, 255, 255, 0.15);
}

.fs-chat__messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.9rem;
    min-height: 220px;
    max-height: 55vh;
    overflow-y: auto;
    background: #f5f7fb;
}

.fs-chat__info {
    color: #6b7280;
    text-align: center;
    margin: auto 0;
}

.fs-chat__message {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    justify-content: flex-start;
}

.fs-chat__message--own {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.fs-chat__bubble {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e6ee;
}

.fs-chat__message--own .fs-chat__bubble {
    background: #d7e6ff;
    border-color: #b9d4ff;
}

.fs-chat__sender {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f2a44;
}

.fs-chat__body {
    white-space: pre-wrap;
    word-break: break-word;
}

.fs-chat__time {
    align-self: flex-end;
    font-size: 0.7rem;
    color: #8a93a3;
    margin-top: 0.15rem;
}

/* Nette foutmelding wanneer een bericht niet verstuurd kon worden (gesloten/geen toegang/fout). */
.fs-chat__error {
    margin: 0;
    padding: 0.6rem 0.8rem;
    background: #FEF2F2;
    color: #B42318;
    border-top: 1px solid #FECACA;
    font-size: 0.85rem;
}

.fs-chat__compose {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    padding: 0.6rem;
    border-top: 1px solid #e2e6ee;
}

.fs-chat__input {
    flex: 1;
    resize: vertical;
    min-height: 48px;
    padding: 0.5rem 0.6rem;
    border: 1px solid #cdd4e0;
    border-radius: 8px;
    font: inherit;
}

/* Chat-toegang als knop-achtige link (plain <a>, geen JS). */
.fs-link-button,
.fs-admin__chat-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 0.9rem;
    border: 1px solid #1f2a44;
    border-radius: 8px;
    background: #1f2a44;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.fs-link-button:hover,
.fs-admin__chat-link:hover {
    background: #2c3a5c;
    color: #fff;
}

.fs-admin__chat-link {
    min-height: 32px;
    padding: 0 0.7rem;
    font-size: 0.85rem;
}

/* De Telerik-grid kleurt anchors donker (oklch(0.36 0 0)) met hogere specificiteit,
   waardoor de chat-link donkere tekst op de donkere knop kreeg (onleesbaar).
   Forceer witte tekst in alle link-states zodat de knop altijd leesbaar is. */
.fs-link-button,
.fs-link-button:link,
.fs-link-button:visited,
.fs-link-button:hover,
.fs-link-button:active,
.fs-admin__chat-link,
.fs-admin__chat-link:link,
.fs-admin__chat-link:visited,
.fs-admin__chat-link:hover,
.fs-admin__chat-link:active {
    color: #fff !important;
}
