/*
 * Copyright (C) 2026 Fluxer Contributors
 *
 * This file is part of Fluxer.
 *
 * Fluxer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Fluxer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
 */

.barrierLayout {
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
	align-items: flex-start;
	position: relative;
	min-height: var(--textarea-min-height);
	box-sizing: border-box;
	padding: var(--user-area-padding-y) 0;
	column-gap: var(--textarea-upload-gap);
	min-width: 0;
	width: 100%;
	max-width: 100%;
}

.barrierLayoutNoAction {
	grid-template-columns: minmax(0, auto) minmax(0, 1fr);
}

.icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--textarea-button-height);
	height: var(--textarea-button-height);
	color: var(--text-primary-muted);
	flex-shrink: 0;
}

.icon svg {
	width: var(--textarea-button-icon-size);
	height: var(--textarea-button-icon-size);
}

.messageArea {
	min-width: 0;
}

.message {
	font-size: inherit;
	line-height: var(--textarea-line-height);
	color: var(--text-chat);
	white-space: normal;
	overflow-wrap: break-word;
}

.actionArea {
	justify-content: flex-end;
}

.actionArea > button {
	margin: 0;
}

.timer {
	border-radius: 0.375rem;
	background-color: var(--background-secondary-alt);
	padding: 0.375rem 0.75rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 600;
	color: var(--text-normal);
	justify-self: end;
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

.timer:hover {
	background-color: var(--background-tertiary);
	border-color: var(--user-area-divider-color);
}

@media (max-width: 768px) {
	.barrierLayout {
		grid-template-columns: minmax(0, auto) minmax(0, 1fr);
		row-gap: var(--spacing-2);
	}

	.actionArea {
		grid-column: 2;
		justify-content: flex-start;
	}
}
