/* Tiridro AI Listing Assistant — widget styling. Scoped under .tal- to avoid
   clashing with the theme/Elementor styles. */

.tal-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 20, 20, 25, 0.55 );
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
}

.tal-modal {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.35 );
}

.tal-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid #eee;
	font-weight: 600;
	font-size: 16px;
}

.tal-close {
	background: none;
	border: none;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	color: #666;
}

.tal-modal-body {
	flex: 1;
	display: flex;
	min-height: 0;
}

.tal-widget {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 320px;
	max-height: 100%;
}

#tal-app-root.tal-widget {
	border: 1px solid #e5e5e5;
	border-radius: 14px;
	min-height: 480px;
}

.tal-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tal-bubble {
	max-width: 82%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
}

.tal-bubble-assistant {
	background: #f2f3f5;
	color: #1a1a1a;
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}

.tal-bubble-assistant-note {
	background: transparent;
	color: #777;
	font-size: 12.5px;
	align-self: center;
	text-align: center;
	max-width: 100%;
}

.tal-bubble-user {
	background: #1a73e8;
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

.tal-thumb {
	max-width: 140px;
	max-height: 140px;
	border-radius: 8px;
	display: block;
}

.tal-composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #eee;
}

.tal-input {
	flex: 1;
	resize: none;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	max-height: 90px;
	font-family: inherit;
}

.tal-btn {
	border: none;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	cursor: pointer;
	font-weight: 600;
	white-space: nowrap;
}

.tal-btn-primary {
	background: #1a73e8;
	color: #fff;
}

.tal-btn-primary:disabled {
	opacity: 0.6;
	cursor: default;
}

.tal-btn-ghost {
	background: #eef0f3;
	color: #1a1a1a;
}

.tal-busy .tal-log {
	opacity: 0.85;
}

.tal-picker {
	align-self: center;
	text-align: center;
	width: 100%;
}

.tal-picker-title {
	font-weight: 600;
	margin-bottom: 10px;
}

.tal-picker-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.tal-preview-wrap {
	border-top: 1px solid #eee;
	padding: 14px 16px;
	overflow-y: auto;
	max-height: 55%;
}

.tal-preview-card {
	background: #fbfbfc;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 16px;
}

.tal-preview-title {
	margin: 0 0 8px;
	font-size: 17px;
}

.tal-preview-desc {
	margin: 0 0 12px;
	font-size: 14px;
	color: #333;
}

.tal-preview-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.tal-chip {
	background: #eef0f3;
	border-radius: 999px;
	padding: 4px 10px;
	font-size: 12.5px;
}

.tal-preview-block {
	margin-bottom: 12px;
}

.tal-preview-block h4 {
	margin: 0 0 4px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #888;
}

.tal-preview-block ul,
.tal-attr-list {
	margin: 0;
	padding-left: 18px;
	font-size: 14px;
}

.tal-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.tal-tag {
	background: #e8f0fe;
	color: #1a73e8;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 12px;
}

.tal-preview-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 6px;
	flex-wrap: wrap;
}

.tal-edit-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tal-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
	color: #444;
}

.tal-field input,
.tal-field textarea {
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	font-family: inherit;
}

.tal-field textarea {
	min-height: 80px;
	resize: vertical;
}

@media ( max-width: 480px ) {
	.tal-modal {
		max-height: 100vh;
		border-radius: 0;
	}
	.tal-bubble {
		max-width: 92%;
	}
}
