/* سکشن اینجا ارتباط با ما — مینیمال */

.home-support {
	--sup-deep: #07141f;
	--sup-base: #0c1f2e;
	--sup-accent: #2dd4bf;
	--sup-accent-2: #38bdf8;
	position: relative;
	z-index: 2;
	overflow: hidden;
	isolation: isolate;
	color: #f8fafc;
	background: linear-gradient(165deg, var(--sup-deep) 0%, var(--sup-base) 100%);
}

.home-support::before {
	content: '';
	position: absolute;
	inset-inline: 0;
	top: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.3), transparent);
	pointer-events: none;
	z-index: 2;
}

.home-support__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(ellipse 55% 50% at 100% 50%, rgba(45, 212, 191, 0.1), transparent 60%);
}

.home-support__inner {
	position: relative;
	z-index: 3;
}

.home-support__row {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	align-items: flex-start;
	max-width: 48rem;
}

@media (min-width: 768px) {
	.home-support__row {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 2rem;
		max-width: none;
	}
}

.home-support__header {
	flex: 1;
	min-width: 0;
}

.home-support__title {
	font-size: clamp(1.5rem, 3.5vw, 2.25rem);
	line-height: 1.3;
	margin: 0 0 0.6rem;
}

.home-support__title-accent {
	background: linear-gradient(120deg, var(--sup-accent), var(--sup-accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.home-support__lead {
	color: rgba(226, 232, 240, 0.78);
	margin: 0;
	max-width: 36rem;
}

.home-support__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	flex-shrink: 0;
}

.home-support__form {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.home-support__field label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.85);
	margin-bottom: 0.35rem;
	text-align: right;
}

.home-support__field .req {
	color: #fb7185;
}

.home-support__field input,
.home-support__field textarea,
.home-support__reply textarea {
	width: 100%;
	border-radius: 0.85rem;
	border: 1px solid rgba(148, 163, 184, 0.28);
	background: rgba(15, 23, 42, 0.45);
	color: #f8fafc;
	padding: 0.7rem 0.9rem;
	font-size: 0.9375rem;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.home-support__field input:focus,
.home-support__field textarea:focus,
.home-support__reply textarea:focus {
	border-color: rgba(45, 212, 191, 0.55);
	box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

.home-support__field textarea,
.home-support__reply textarea {
	resize: vertical;
	min-height: 5rem;
}

.home-support__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.home-support__error {
	font-size: 0.8125rem;
	color: #fda4af;
	background: rgba(244, 63, 94, 0.12);
	border: 1px solid rgba(244, 63, 94, 0.25);
	border-radius: 0.75rem;
	padding: 0.65rem 0.85rem;
	text-align: right;
}

.home-support__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	border-radius: 0.9rem;
	font-weight: 700;
	font-size: 0.9rem;
	padding: 0.7rem 1.15rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, filter 0.2s, background 0.2s, border-color 0.2s, opacity 0.2s;
	text-decoration: none;
	white-space: nowrap;
}

.home-support__btn:active {
	transform: scale(0.98);
}

.home-support__btn--primary {
	background: linear-gradient(135deg, #14b8a6, #0ea5e9);
	color: #042f2e;
	box-shadow: 0 8px 24px rgba(14, 165, 233, 0.22);
}

.home-support__btn--primary:hover {
	filter: brightness(1.05);
}

.home-support__btn--ghost {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(148, 163, 184, 0.28);
	color: #e2e8f0;
}

.home-support__btn--ghost:hover {
	background: rgba(255, 255, 255, 0.08);
}

.home-support__btn--sm {
	padding: 0.55rem 0.9rem;
	font-size: 0.8125rem;
}

.home-support__btn--submit {
	width: 100%;
	margin-top: 0.15rem;
}

.home-support__btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

.home-support__spinner {
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(4, 47, 46, 0.25);
	border-top-color: #042f2e;
	border-radius: 50%;
	animation: homeSupportSpin 0.7s linear infinite;
}

@keyframes homeSupportSpin {
	to { transform: rotate(360deg); }
}

.home-support__chat-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	text-align: right;
}

.home-support__chat-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.85rem;
	color: var(--sup-accent);
	margin: 0 0 0.2rem;
}

.home-support__chat-subject {
	font-size: 0.95rem;
	font-weight: 700;
	margin: 0;
}

.home-support__chat {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	max-height: min(50vh, 22rem);
	overflow-y: auto;
	padding: 0.75rem;
	border-radius: 1rem;
	background: rgba(2, 12, 20, 0.45);
	border: 1px solid rgba(148, 163, 184, 0.22);
	margin-bottom: 0.75rem;
}

.home-support__bubble {
	max-width: 88%;
	padding: 0.7rem 0.85rem;
	border-radius: 1rem;
	font-size: 0.875rem;
	line-height: 1.65;
	animation: homeSupportIn 0.25s ease both;
	text-align: right;
}

.home-support__bubble--guest,
.home-support__bubble--user {
	align-self: flex-start;
	background: rgba(56, 189, 248, 0.14);
	border: 1px solid rgba(56, 189, 248, 0.22);
	border-bottom-right-radius: 0.3rem;
}

.home-support__bubble--staff {
	align-self: flex-end;
	background: rgba(45, 212, 191, 0.16);
	border: 1px solid rgba(45, 212, 191, 0.28);
	border-bottom-left-radius: 0.3rem;
}

.home-support__bubble--system {
	align-self: center;
	max-width: 95%;
	background: transparent;
	border: 1px dashed rgba(148, 163, 184, 0.35);
	border-radius: 0.75rem;
	text-align: center;
	font-size: 0.8rem;
	opacity: 0.9;
}

.home-support__bubble-meta {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	font-size: 0.7rem;
	opacity: 0.7;
	margin-bottom: 0.25rem;
}

.home-support__bubble-body {
	white-space: pre-wrap;
	word-break: break-word;
}

.home-support__reply {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.home-support__reply textarea {
	min-height: 3.5rem;
}

@keyframes homeSupportIn {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Modals */
.home-support-modal {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: grid;
	place-items: center;
	padding: 1rem;
}

.home-support-modal[hidden] {
	display: none !important;
}

.home-support-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.72);
	backdrop-filter: blur(4px);
}

.home-support-modal__panel {
	position: relative;
	width: min(100%, 26rem);
	background: linear-gradient(165deg, #0f2740, #0b1a2a);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 1.35rem;
	padding: 1.35rem 1.4rem;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
	animation: homeSupportIn 0.3s ease both;
	text-align: center;
}

.home-support-modal__panel--form,
.home-support-modal__panel--chat {
	width: min(100%, 36rem);
	max-height: min(92vh, 48rem);
	overflow: auto;
	text-align: right;
}

.home-support-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
	text-align: right;
}

.home-support-modal__head .home-support-modal__title {
	margin: 0;
}

.home-support-modal__x {
	border: 0;
	background: transparent;
	color: rgba(226, 232, 240, 0.7);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.15rem 0.35rem;
}

.home-support-modal__icon {
	width: 3rem;
	height: 3rem;
	margin: 0 auto 0.85rem;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: rgba(45, 212, 191, 0.18);
	color: var(--sup-accent);
}

.home-support-modal__icon svg {
	width: 1.4rem;
	height: 1.4rem;
}

.home-support-modal__title {
	font-size: 1.1rem;
	font-weight: 800;
	margin: 0 0 0.5rem;
}

.home-support-modal__text {
	color: rgba(226, 232, 240, 0.72);
	font-size: 0.9rem;
	margin: 0 0 0.5rem;
}

.home-support-modal__text--start {
	text-align: right;
	margin-bottom: 0.85rem;
}

.home-support-modal__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--sup-accent);
	letter-spacing: 0.06em;
	margin: 0 0 1.25rem;
}

.home-support-modal__actions {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

@media (min-width: 480px) {
	.home-support-modal__actions {
		flex-direction: row;
		justify-content: center;
	}

	.home-support__form--modal .home-support-modal__actions {
		justify-content: flex-start;
	}
}
