/* Film Rulosu Hızlı İletişim */

.frhi-widget {
	--frhi-size: 48px;
	--frhi-radius: 20px;
	--frhi-cta: var(
		--wp--preset--color--primary,
		var(
			--e-global-color-primary,
			var(
				--ast-global-color-0,
				var(
					--primary-color,
					var(--theme-primary, var(--primary, #1746c8))
				)
			)
		)
	);
	--frhi-wa: #25d366;
	--frhi-tel: #00bce4;
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 100002;
	pointer-events: none;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	margin: 0;
	padding: 0;
}

.frhi-widget.frhi-pos-right {
	right: 0;
	left: auto;
}

.frhi-widget.frhi-pos-left {
	left: 0;
	right: auto;
}

/* Şerit — ekran kenarına yapışık, sol kenar oval */
.frhi-stack {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: var(--frhi-size);
	margin: 0;
	padding: 0;
	overflow: visible;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
}

.frhi-btn {
	appearance: none;
	border: 0;
	margin: 0;
	padding: 0;
	width: 100%;
	height: var(--frhi-size);
	min-height: var(--frhi-size);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	color: #fff !important;
	background-color: var(--frhi-bg, #334155);
	text-decoration: none !important;
	cursor: pointer;
	position: relative;
	box-sizing: border-box;
	border-radius: 0;
	line-height: 0;
	overflow: visible;
	z-index: 1;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
}

/* Webify: sol dış köşeler oval, sağ düz — button teması ezmesin diye !important */
.frhi-pos-right .frhi-stack > .frhi-btn:first-child {
	border-radius: var(--frhi-radius) 0 0 0 !important;
}

.frhi-pos-right .frhi-stack > .frhi-btn:last-child {
	border-radius: 0 0 0 var(--frhi-radius) !important;
}

.frhi-pos-left .frhi-stack > .frhi-btn:first-child {
	border-radius: 0 var(--frhi-radius) 0 0 !important;
}

.frhi-pos-left .frhi-stack > .frhi-btn:last-child {
	border-radius: 0 0 var(--frhi-radius) 0 !important;
}

.frhi-pos-right .frhi-stack > .frhi-btn:only-child {
	border-radius: var(--frhi-radius) 0 0 var(--frhi-radius) !important;
}

.frhi-pos-left .frhi-stack > .frhi-btn:only-child {
	border-radius: 0 var(--frhi-radius) var(--frhi-radius) 0 !important;
}

/* CTA button — tema button stillerine karşı */
.frhi-btn.frhi-btn-callback {
	border-radius: 0;
}

.frhi-pos-right .frhi-stack > .frhi-btn-callback:first-child {
	border-top-left-radius: var(--frhi-radius) !important;
	border-top-right-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
	border-bottom-left-radius: 0 !important;
}

.frhi-pos-left .frhi-stack > .frhi-btn-callback:first-child {
	border-top-left-radius: 0 !important;
	border-top-right-radius: var(--frhi-radius) !important;
	border-bottom-right-radius: 0 !important;
	border-bottom-left-radius: 0 !important;
}

.frhi-btn:hover,
.frhi-btn:focus,
.frhi-btn:focus-visible,
.frhi-btn:active,
.frhi-btn:visited {
	color: #fff !important;
	background-color: var(--frhi-bg, #334155);
	text-decoration: none !important;
	outline: none;
	z-index: 6;
	opacity: 1;
	filter: none;
	box-shadow: none;
}

.frhi-btn-icon,
.frhi-cta-icon {
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 2;
	color: #fff !important;
	flex-shrink: 0;
}

.frhi-cta-icon {
	width: 18px;
	height: 18px;
}

.frhi-btn-icon svg,
.frhi-cta-icon svg {
	width: 100%;
	height: 100%;
	display: block;
	color: #fff !important;
	fill: #fff !important;
}

.frhi-btn-icon svg path,
.frhi-cta-icon svg path,
.frhi-btn:hover .frhi-btn-icon svg path,
.frhi-btn:hover .frhi-cta-icon svg path {
	fill: #fff !important;
	stroke: none !important;
}

/* Hover etiketi — slider */
.frhi-tip {
	position: absolute;
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	padding: 0 18px 0 16px;
	background-color: var(--frhi-bg, #334155);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.01em;
	white-space: nowrap;
	visibility: hidden;
	pointer-events: auto;
	z-index: 1;
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
}

.frhi-pos-right .frhi-tip {
	right: 100%;
	border-radius: var(--frhi-radius) 0 0 var(--frhi-radius);
	transform: translateX(100%);
}

.frhi-pos-left .frhi-tip {
	left: 100%;
	border-radius: 0 var(--frhi-radius) var(--frhi-radius) 0;
	padding: 0 16px 0 18px;
	transform: translateX(-100%);
}

.frhi-btn:hover .frhi-tip,
.frhi-btn:focus-visible .frhi-tip {
	visibility: visible;
	transform: translateX(0);
	color: #fff !important;
}

/* Dikey CTA */
.frhi-btn-callback {
	--frhi-bg: var(--frhi-cta);
	height: auto;
	min-height: 170px;
	padding: 14px 0 16px;
	justify-content: space-between;
	gap: 12px;
}

.frhi-cta-arrow {
	transition: transform 0.2s ease;
}

.frhi-btn-callback.is-open .frhi-cta-arrow {
	transform: rotate(180deg);
}

.frhi-pos-left .frhi-cta-arrow {
	transform: rotate(180deg);
}

.frhi-pos-left .frhi-btn-callback.is-open .frhi-cta-arrow {
	transform: rotate(0deg);
}

.frhi-btn-label {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.06em;
	text-transform: none;
	color: #fff !important;
	white-space: nowrap;
	margin: 0;
	padding: 0;
}

.frhi-btn-whatsapp {
	--frhi-bg: var(--frhi-wa);
}

.frhi-btn-phone {
	--frhi-bg: var(--frhi-tel);
}

.frhi-btn-instagram {
	--frhi-bg: var(--frhi-social, #dd2a7b);
}

.frhi-btn-facebook {
	--frhi-bg: var(--frhi-social, #1877f2);
}

.frhi-btn-twitter {
	--frhi-bg: var(--frhi-social, #111827);
}

.frhi-btn-youtube {
	--frhi-bg: var(--frhi-social, #ff0000);
}

.frhi-btn-linkedin {
	--frhi-bg: var(--frhi-social, #0a66c2);
}

.frhi-btn-tiktok {
	--frhi-bg: var(--frhi-social, #010101);
}

.frhi-btn-telegram {
	--frhi-bg: var(--frhi-social, #26a5e4);
}

.frhi-btn-email {
	--frhi-bg: var(--frhi-social, #ea4335);
}

/* Modal */
.frhi-modal[hidden] {
	display: none !important;
}

.frhi-modal {
	--frhi-cta: var(
		--wp--preset--color--primary,
		var(
			--e-global-color-primary,
			var(
				--ast-global-color-0,
				var(
					--primary-color,
					var(--theme-primary, var(--primary, #1746c8))
				)
			)
		)
	);
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	font-family: inherit;
}

.frhi-modal-right {
	justify-content: flex-end;
	padding-right: 60px;
}

.frhi-modal-left {
	justify-content: flex-start;
	padding-left: 60px;
}

/* Tam ekran karartma — sağda beyaz boşluk YOK */
.frhi-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
}

.frhi-modal-panel {
	position: relative;
	z-index: 1;
	width: min(380px, calc(100vw - 32px));
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
	overflow: hidden;
	animation: frhi-pop 0.2s ease;
}

@keyframes frhi-pop {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.frhi-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	background: #f7f9fc;
	border-bottom: 1px solid #eef2f7;
}

.frhi-modal-head h2 {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--frhi-cta);
}

.frhi-modal-close {
	appearance: none;
	border: 0;
	background: transparent;
	width: 28px;
	height: 28px;
	padding: 0;
	font-size: 26px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
}

.frhi-modal-close:hover {
	color: #475569;
}

.frhi-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
}

.frhi-modal-desc {
	margin: 0 0 2px;
	font-size: 13px;
	line-height: 1.45;
	color: #64748b;
}

.frhi-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.frhi-field input,
.frhi-field textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	padding: 13px 18px;
	font-family: inherit;
	font-size: 14px;
	color: #0f172a;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.frhi-field textarea {
	border-radius: 18px;
	resize: vertical;
	min-height: 100px;
}

.frhi-field input::placeholder,
.frhi-field textarea::placeholder {
	color: #94a3b8;
}

.frhi-field input:focus,
.frhi-field textarea:focus {
	outline: none;
	border-color: var(--frhi-cta);
	box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.frhi-form-error {
	margin: 0;
	color: #dc2626;
	font-size: 13px;
}

.frhi-submit {
	appearance: none;
	border: 0;
	border-radius: 999px;
	background: var(--frhi-cta);
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 14px 18px;
	margin-top: 4px;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.frhi-submit:hover {
	filter: brightness(0.93);
}

body.frhi-modal-open {
	overflow: hidden;
}

/* Mobil: altta yatay — sol uç sol köşeler, sağ uç sağ köşeler */
@media (max-width: 768px) {
	.frhi-widget {
		--frhi-size: 52px;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		transform: none;
		width: 100%;
		padding: 0;
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	.frhi-widget.frhi-pos-right,
	.frhi-widget.frhi-pos-left {
		left: 0;
		right: 0;
	}

	.frhi-stack {
		flex-direction: row;
		width: 100%;
		height: var(--frhi-size);
		overflow: visible;
		border-radius: 0 !important;
		box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.14);
	}

	/* Masaüstü dikey köşe kurallarını iptal et */
	.frhi-pos-right .frhi-stack > .frhi-btn:first-child,
	.frhi-pos-right .frhi-stack > .frhi-btn:last-child,
	.frhi-pos-left .frhi-stack > .frhi-btn:first-child,
	.frhi-pos-left .frhi-stack > .frhi-btn:last-child,
	.frhi-pos-right .frhi-stack > .frhi-btn:only-child,
	.frhi-pos-left .frhi-stack > .frhi-btn:only-child,
	.frhi-pos-right .frhi-stack > .frhi-btn-callback:first-child,
	.frhi-pos-left .frhi-stack > .frhi-btn-callback:first-child,
	.frhi-btn.frhi-btn-callback {
		border-radius: 0 !important;
		border-top-left-radius: 0 !important;
		border-top-right-radius: 0 !important;
		border-bottom-right-radius: 0 !important;
		border-bottom-left-radius: 0 !important;
	}

	/* Yatay: ilk buton = sol oval, son buton = sağ oval */
	.frhi-stack > .frhi-btn:first-child,
	.frhi-stack > .frhi-btn-callback:first-child {
		border-radius: var(--frhi-radius) 0 0 var(--frhi-radius) !important;
	}

	.frhi-stack > .frhi-btn:last-child {
		border-radius: 0 var(--frhi-radius) var(--frhi-radius) 0 !important;
	}

	.frhi-stack > .frhi-btn:only-child {
		border-radius: var(--frhi-radius) !important;
	}

	.frhi-btn {
		flex: 0 0 var(--frhi-size);
		width: var(--frhi-size);
		height: var(--frhi-size);
		min-height: var(--frhi-size);
	}

	.frhi-btn-callback {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
		min-height: var(--frhi-size);
		height: var(--frhi-size);
		flex-direction: row;
		justify-content: center;
		padding: 0 12px;
		gap: 8px;
	}

	.frhi-btn-label {
		writing-mode: horizontal-tb;
		transform: none !important;
		font-size: 13px;
		letter-spacing: 0.02em;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.frhi-cta-icon {
		width: 16px;
		height: 16px;
	}

	.frhi-tip {
		display: none !important;
	}

	.frhi-modal-right,
	.frhi-modal-left {
		align-items: flex-end;
		justify-content: center;
		padding: 16px 12px calc(var(--frhi-size) + 20px + env(safe-area-inset-bottom, 0px));
	}

	.frhi-modal-panel {
		width: min(420px, 100%);
	}
}
