/* Canary-only compatibility fixes. Legacy staff styles remain untouched. */
.chat-window .chat-select-button[data-expandable="1"] {
	padding-top: 24px;
}

.chat-window .chat-select-button[data-expandable="1"] .chat-expand-button {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	left: 2px;
	right: 2px;
	height: 18px;
	min-height: 18px;
	white-space: nowrap;
}

.chat-window .chat-select-button[data-expandable="1"] .chat-expand-button a {
	flex: none;
	margin: 0 2px;
}

.chat-window .chat-message-edited {
	color: #666;
	font-size: 0.82em;
	font-style: italic;
	margin-top: 2px;
	text-align: right;
}

.chat-window .chat-message-edited:empty {
	display: none;
}

.chat-window .chat-history-loader {
	clear: both;
	padding: 6px 0 10px;
	text-align: center;
}

.chat-window .chat-history-loader button {
	background: #f3f3f3;
	border: 1px solid #aaa;
	border-radius: 4px;
	color: #333;
	cursor: pointer;
	font: inherit;
	padding: 5px 10px;
}

.chat-window .chat-history-loader button:hover {
    background: #e8e8e8;
}

.chat-window .chat-load-more {
    text-align: center;
    font-size: 0.9em;
}

.chat-window .chat-load-more a {
    color: #555;
}

/* Overlay above the composer: preserve the fixed-height legacy cabinet form. */
.chat-window .chat-form form {
    position: relative;
}

.chat-window .chat-clipboard-preview {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 200px;
    overflow: auto;
    padding: 8px;
    background: #fff;
    color: #333;
    border: 1px solid #bbb;
    border-radius: 4px;
    box-shadow: 0 -2px 8px #0002;
}

.chat-window .chat-clipboard-status {
    font-size: 13px;
    margin-bottom: 6px;
}

.chat-window .chat-clipboard-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 4px;
}

.chat-window .chat-clipboard-item img {
    max-width: 140px;
    height: 100px;
    object-fit: contain;
}

.chat-window .chat-clipboard-item button {
    cursor: pointer;
    color: #333;
    background: #f4f4f4;
    border: 1px solid #bbb;
    padding: 3px 8px;
}
