/*
 * Casetti "Canlı Destek" box (template-parts/site/support.php, support.js): a dark pill button bottom right (from 768 to
 * 899 px bottom left, above the phone's bottom bar; below 768 px hidden, the header's support button opens the box), and
 * the card above it. The live 756808 #css-sup (proje/ENVANTER-KOD-BUYUK.md §1.4) and Additional CSS (phones).
 */
.c-support {
	position: fixed;
	z-index: 120;
	inset-block-end: calc(24px + var(--myco-sticky-cart-height, 0px)); /* above the product page's sticky add to cart bar */
	inset-inline-end: 24px;
	font-family: var(--myco-font-sans);
	transition: inset-block-end var(--myco-transition);
}

.c-support__fab {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 20px 8px 8px;
	border: 1px solid rgba(201, 164, 106, 0.55);
	border-radius: 999px;
	background: var(--casetti-dark);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	color: var(--casetti-cream);
	font: inherit; /* Buttons do not inherit the font: the live button fell back to a serif face. */
	line-height: 1.3;
	text-align: start;
	cursor: pointer;
	transition: transform 0.3s, box-shadow 0.3s;
}

.c-support__fab:hover {
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
	transform: translateY(-2px);
}

.c-support__icon {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--casetti-gold-on-dark);
	color: var(--casetti-dark);
}

.c-support__icon .c-icon {
	width: 22px;
	height: 22px;
	stroke-width: 1.6;
}

.c-support__dot {
	position: absolute;
	inset-block-end: 1px;
	inset-inline-end: 1px;
	width: 11px;
	height: 11px;
	border: 2px solid var(--casetti-dark);
	border-radius: 50%;
	background: #b9b0a2;
}

.c-support.is-online .c-support__dot {
	background: #3ccf6e;
}

.c-support__label b {
	display: block;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
}

.c-support__label span {
	display: block;
	margin-top: 2px;
	color: #b5ab9c;
	font-size: 11.5px;
}

/* The card: hidden (no focus, not read) until opened. */
.c-support__card {
	position: absolute;
	inset-block-end: 74px;
	inset-inline-end: 0;
	width: 340px;
	overflow: hidden;
	background: var(--myco-color-white);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	color: var(--casetti-ink);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(0.98);
	transform-origin: bottom right;
	transition: opacity 0.3s, transform 0.3s, visibility 0s linear 0.3s;
}

.c-support.is-open .c-support__card {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.3s, transform 0.3s, visibility 0s;
}

.c-support__head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 22px;
	background: var(--casetti-dark);
	color: var(--casetti-cream);
}

.c-support__avatar {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--casetti-gold-on-dark);
	color: var(--casetti-dark);
	font: 600 24px/1 var(--casetti-font-display);
}

.c-support__avatar .c-support__dot {
	inset-block-end: 0;
	inset-inline-end: 0;
	width: 12px;
	height: 12px;
}

.c-support__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
}

.c-support__status {
	display: block;
	margin-top: 3px;
	color: #b5ab9c;
	font-size: 12px;
}

.c-support__close {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #b5ab9c;
	cursor: pointer;
}

.c-support__close:hover {
	color: var(--casetti-cream);
}

.c-support__close .c-icon {
	width: 16px;
	height: 16px;
	stroke-width: 2;
}

.c-support__body {
	padding: 20px 22px 8px;
	background: var(--casetti-cream);
}

.c-support__bubble {
	max-width: 92%;
	margin: 0 0 14px;
	padding: 14px 16px;
	background: var(--myco-color-white);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	color: #3a352e;
	font-size: 14px;
	line-height: 1.55;
}

.c-support__bubble b {
	color: var(--casetti-ink);
	font-weight: 600;
}

.c-support__form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0;
	padding: 8px 8px 8px 12px;
	border: 1px solid #e6e0d6;
	background: var(--myco-color-white);
	transition: border-color 0.2s;
}

.c-support__form:focus-within {
	border-color: var(--casetti-gold);
}

.c-support__form.is-error {
	border-color: #b5653b;
	animation: c-support-shake 0.4s;
}

.c-support__form textarea {
	flex: 1;
	min-height: 66px;
	margin: 0;
	padding: 4px 0;
	border: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--casetti-ink);
	font: 400 14px/1.5 var(--myco-font-sans);
	resize: none;
}

.c-support__send {
	display: grid;
	flex: none;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--casetti-dark);
	color: var(--casetti-cream);
	cursor: pointer;
	transition: background-color 0.2s;
}

.c-support__send:hover {
	background: var(--casetti-gold);
	color: var(--myco-color-white);
}

.c-support__send .c-icon {
	width: 18px;
	height: 18px;
	stroke-width: 1.8;
}

.c-support__hint {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 10px 0 6px;
	color: #6f6559; /* Live #8a8174: 3.5:1 on the cream. */
	font-size: 11.5px;
}

.c-support__hint .c-icon {
	width: 13px;
	height: 13px;
	color: var(--casetti-whatsapp);
	stroke-width: 2;
}

.c-support__foot {
	margin: 0;
	padding: 6px 22px 18px;
	background: var(--casetti-cream);
	color: #6f6559;
	font-size: 11.5px;
	line-height: 1.6;
	text-align: center;
}

.c-support__foot a {
	color: var(--casetti-text-soft);
	text-decoration: underline;
}

@keyframes c-support-shake {
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

/* From 768 to 899 px: bottom left, above the bottom bar. */
@media (max-width: 899.98px) {
	.c-support {
		inset-block-end: calc(var(--casetti-mobile-nav-h) + 14px + env(safe-area-inset-bottom) + var(--myco-sticky-cart-height, 0px));
		inset-inline: 14px auto;
	}

	.c-support__card {
		inset-inline: 0 auto;
		transform-origin: bottom left;
	}
}

/* Phones: no pill (the header's support button opens the box); the card right above the bottom bar. */
@media (max-width: 767px) {
	.c-support {
		inset-inline: 14px;
	}

	.c-support__fab {
		display: none;
	}

	.c-support__card {
		inset-block-end: 0;
		width: auto;
		max-height: calc(100dvh - var(--casetti-mobile-nav-h) - 150px);
		overflow-y: auto;
		inset-inline: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-support__form.is-error {
		animation: none;
	}
}
