@use "../../globals.scss" as globals;

.messages {
	flex: 1 1 auto;
	height: calc(60vh - 55px);
	overflow-x: hidden;
	overflow-y: auto;
}

.chatheader {
	display: flex;
	justify-content: flex-end;
	height: 40px;
	gap: 10px;
	padding: 5px 10px;
	@include globals.borderRadius(3px, 3px, 3px, 3px);
	background-color: var(--accent-light);
	position: relative;
	box-sizing: border-box;

	.buttons {
		display: flex;
		gap: 5px;

		button {
			background: var(--close-button) !important;
			margin-left: auto;

			&:hover {
				background: var(--close-button-hover) !important;
			}
		}
	}
}

.sessionWarning {
	position: absolute;
	background: var(--status-error-bg);
	@include globals.borderRadius(3px, 3px, 3px, 3px);
	top: -40px;
	left: -15px;
	width: calc(100% + 30px);
	text-align: center;
	color: var(--status-error-text);
	z-index: 10;
}

.refreshBtn {
	position: absolute;
	right: 50px;
	bottom: -58px;
}

.pendingBanner {
	background-color: var(--warning-light);
	color: var(--warning-dark);
	padding: 4px 8px;
	text-align: center;
}

.status,
.error {
	padding: 4px 8px;
	line-height: 1.8;
	color: var(--text-soft);
}

.typingComponent {
	display: flex;
	flex: 0 0 auto;
	/* Stay at the bottom, don't expand */
	height: 5px;
	padding: 5px;
}

.cantSend {
	color: var(--status-error-text);
}

.chatConfirmOverlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	padding: 20px;
	box-sizing: border-box;
}

.chatConfirmBox {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	text-align: center;

	.actions {
		margin-top: 15px;
		display: flex;
		justify-content: center;
		gap: 10px;

		button {
			padding: 8px 16px;
			border: none;
			border-radius: 4px;
			cursor: pointer;
			font-weight: 600;

			&.confirm {
				background: var(--danger);
				color: #fff;

				&:hover {
					background: var(--danger-hover);
				}
			}

			&.cancel {
				background: #e5e7eb;
				color: #111827;

				&:hover {
					background: #d1d5db;
				}
			}
		}
	}
}

.agencyLogoAfterValidation {
	bottom: -58px;
	right: auto;
	left: -15px;
}