/* Fonyx loads only after a visitor opens chat or requests a reservation. */
#beyoglu-fonyx {
	--fonyx-gold: #e8c489;
	--fonyx-green: #123f3b;
	--fonyx-cream: #f2ebdd;
	--fonyx-edge: max(20px, env(safe-area-inset-right));
	--fonyx-bottom: max(20px, env(safe-area-inset-bottom));
}

#beyoglu-chat-launcher,
body > #beyoglu-fonyx-provider-launcher {
	position: fixed !important;
	right: max(20px, env(safe-area-inset-right)) !important;
	bottom: max(20px, env(safe-area-inset-bottom)) !important;
	z-index: 55 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 56px !important;
	min-width: 56px !important;
	height: 56px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(232, 196, 137, .65) !important;
	border-radius: 50% !important;
	background: #123f3b !important;
	color: #e8c489 !important;
	box-shadow: 0 5px 20px rgba(0, 0, 0, .2) !important;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease !important;
	-webkit-tap-highlight-color: transparent;
}

#beyoglu-chat-launcher svg,
#beyoglu-fonyx-provider-launcher svg { width: 25px; height: 25px; pointer-events: none; }
#beyoglu-chat-launcher > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#beyoglu-chat-launcher:hover,
body > #beyoglu-fonyx-provider-launcher:hover { background: #184e47 !important; box-shadow: 0 7px 24px rgba(0, 0, 0, .28) !important; }
#beyoglu-chat-launcher:disabled { cursor: progress; opacity: .75; }
#beyoglu-fonyx [hidden],
#beyoglu-chat-launcher[hidden] { display: none !important; }

#beyoglu-fonyx [data-fonyx-chat-status],
#beyoglu-fonyx [data-fonyx-chat-fallback] {
	position: fixed;
	right: var(--fonyx-edge);
	z-index: 55;
	width: max-content;
	max-width: min(290px, calc(100vw - 40px));
	margin: 0;
	border: 1px solid rgba(232, 196, 137, .28);
	border-radius: 10px;
	background: #0a1615;
	color: var(--fonyx-cream);
	font: 14px/1.5 Karla, system-ui, sans-serif;
}
#beyoglu-fonyx [data-fonyx-chat-status] { bottom: calc(var(--fonyx-bottom) + 70px); padding: 11px 14px; }
#beyoglu-fonyx.has-chat-error [data-fonyx-chat-status] { bottom: calc(var(--fonyx-bottom) + 118px); }
#beyoglu-fonyx [data-fonyx-chat-fallback] { bottom: calc(var(--fonyx-bottom) + 70px); padding: 9px 14px; color: var(--fonyx-gold); text-decoration: underline; text-underline-offset: 3px; }

body > #beyoglu-fonyx-chat-panel {
	right: max(20px, env(safe-area-inset-right)) !important;
	bottom: calc(max(20px, env(safe-area-inset-bottom)) + 70px) !important;
	z-index: 56 !important;
	width: 390px !important;
	max-width: calc(100% - 40px) !important;
	height: 600px !important;
	max-height: calc(100dvh - 116px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
	border: 1px solid rgba(232, 196, 137, .34) !important;
	border-radius: 16px !important;
	background: #fff !important;
	box-shadow: 0 16px 55px rgba(0, 0, 0, .3) !important;
	overflow: hidden !important;
	box-sizing: border-box;
}
#beyoglu-fonyx-chat-panel > iframe { width: 100% !important; height: calc(100% - 44px) !important; min-height: 0; border: 0 !important; }
.beyoglu-chat-panel__bar { display: flex; align-items: center; justify-content: space-between; height: 44px; padding-left: 16px; background: #123f3b; color: #f2ebdd; font: 500 15px/1 Urbanist, system-ui, sans-serif; }
.beyoglu-chat-panel__close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #e8c489; font: 28px/1 system-ui, sans-serif; cursor: pointer; }
.beyoglu-chat-panel__close:hover { background: rgba(255, 255, 255, .08); }

body.beyoglu-chat-is-blocked #beyoglu-chat-launcher,
body.beyoglu-chat-is-blocked > #beyoglu-fonyx-provider-launcher,
body.beyoglu-chat-is-blocked > #beyoglu-fonyx-chat-panel,
body.beyoglu-chat-is-blocked #beyoglu-fonyx [data-fonyx-chat-status],
body.beyoglu-chat-is-blocked #beyoglu-fonyx [data-fonyx-chat-fallback] { visibility: hidden !important; pointer-events: none !important; }

body.reservation-is-open { overflow: hidden; }
#beyoglu-reservation {
	width: min(560px, calc(100vw - 32px));
	max-width: none;
	max-height: min(890px, calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
	margin: auto;
	padding: 0;
	border: 1px solid rgba(232, 196, 137, .55);
	border-radius: 18px;
	background: #fff;
	color: #14231e;
	box-shadow: 0 24px 90px rgba(0, 0, 0, .4);
	overflow: hidden;
	box-sizing: border-box;
}
#beyoglu-reservation:not([open]) { display: none; }
#beyoglu-reservation[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
#beyoglu-reservation::backdrop { background: rgba(3, 12, 11, .78); backdrop-filter: blur(5px); }
.beyoglu-reservation__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 12px 16px 12px 22px; background: #123f3b; color: #f2ebdd; }
.beyoglu-reservation__header p { margin: 6px 0 0; font: 13px/1.5 Karla, system-ui, sans-serif; }
#beyoglu-reservation-title { margin: 0; color: inherit; font: 400 clamp(20px, 4.5vw, 25px)/1.2 Urbanist, system-ui, sans-serif; }
#beyoglu-reservation [data-fonyx-close] { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(232, 196, 137, .45); border-radius: 50%; background: transparent; color: #e8c489; font: 26px/1 system-ui, sans-serif; cursor: pointer; }
#beyoglu-reservation [data-fonyx-close]:hover { background: rgba(255, 255, 255, .07); }
.beyoglu-reservation__frame { min-height: 0; height: min(720px, calc(100dvh - 208px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); overflow: hidden; background: #fff; }
.beyoglu-reservation__frame iframe { display: block; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; background: #fff; }
.beyoglu-reservation__fallback { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 13px 18px; border-top: 1px solid #e7dcc8; background: #f2ebdd; color: #55605e; font: 14px/1.5 Karla, system-ui, sans-serif; text-align: center; }
.beyoglu-reservation__fallback p { width: 100%; margin: 0; }
.beyoglu-reservation__fallback a { color: #123f3b; text-decoration: underline; text-underline-offset: 3px; }
.beyoglu-reservation__fallback a:hover { color: #07100f; }
#beyoglu-fonyx button:focus-visible,
#beyoglu-fonyx a:focus-visible,
#beyoglu-fonyx-provider-launcher:focus-visible,
#beyoglu-fonyx-chat-panel button:focus-visible { outline: 3px solid #e8c489; outline-offset: 3px; }
.beyoglu-chat-panel__close:focus-visible { outline-offset: -5px !important; }

@media (max-width: 600px) {
	#beyoglu-fonyx { --fonyx-edge: max(14px, env(safe-area-inset-right)); --fonyx-bottom: max(14px, env(safe-area-inset-bottom)); }
	#beyoglu-chat-launcher,
	body > #beyoglu-fonyx-provider-launcher { right: max(14px, env(safe-area-inset-right)) !important; bottom: max(14px, env(safe-area-inset-bottom)) !important; }
	body > #beyoglu-fonyx-chat-panel { right: max(14px, env(safe-area-inset-right)) !important; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 70px) !important; max-width: calc(100% - 28px) !important; max-height: calc(100dvh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important; }
	#beyoglu-reservation { width: calc(100vw - 20px); max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border-radius: 14px; }
	.beyoglu-reservation__header { min-height: 64px; padding: 10px 12px 10px 18px; }
	.beyoglu-reservation__frame { height: min(720px, calc(100dvh - 192px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); }
	.beyoglu-reservation__fallback { padding: 11px 14px; gap: 5px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	#beyoglu-chat-launcher,
	body > #beyoglu-fonyx-provider-launcher { transition: none !important; transform: none !important; }
}
