/*
 * Telefonda altta yapisik eylem cubugu (inc/mobile-bar.php).
 *
 * Ayri dosya: tema stili baska bir yerde Tailwind ile derleniyor ve derleme
 * araclari sunucuda yok. hermest-app'ten SONRA yukleniyor.
 *
 * Serit varsayilan olarak GIZLI. Gorundugu genislik panelden geliyor; gizleme,
 * o medya sorgusu ve renk degiskenleri <head>'de satir ici basiliyor
 * (hermest_mobile_bar_head_css). Olculer "Hermest Mobil CTA + WhatsApp"
 * tasarimindan birebir.
 */

:root {
	/* Seridin kapladigi yukseklik: 12px alt bosluk + 60px serit (46px dugme +
	   2x7px ic bosluk). Sayfa sonu boslugu, acilan kartlar ve yukari-cik
	   dugmesi buna gore hizalaniyor. Ilk surum 96px'ti (tasarimdaki 56px
	   dugmeler); telefonda fazla yer kapliyordu, 19 Ekim 2026'da kucultuldu. */
	--hermest-mbar-height: 72px;
	--hermest-mbar-ink: #0e2a30;
	--hermest-mbar-muted: #5e625f;
}

/* Gizli/gorunur kurali burada DEGIL, <head>'deki satir ici stilde: bu dosya
   ondan sonra yuklendigi icin buradaki display:none medya sorgusunu ezerdi. */

/* --- Serit ---------------------------------------------------------------- */

.hermest-mbar__bar {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: flex;
	align-items: stretch;
	gap: 8px;
	padding: 7px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 10px 30px rgb(14 42 48 / 18%);
}

.hermest-mbar__cta,
.hermest-mbar__wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	color: #fff;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.hermest-mbar__cta:active,
.hermest-mbar__wa:active {
	transform: scale(0.98);
}

.hermest-mbar__cta:focus-visible,
.hermest-mbar__wa:focus-visible,
.hermest-mbar__minimise:focus-visible,
.hermest-mbar__topic:focus-visible,
.hermest-mbar__send:focus-visible {
	outline: 3px solid var(--hermest-mbar-cta);
	outline-offset: 2px;
}

.hermest-mbar__cta {
	flex: 1 1 auto;
	min-width: 0;
	gap: 8px;
	padding: 0 14px;
	border-radius: 100px;
	background: var(--hermest-mbar-cta);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.2px;
	line-height: 1.2;
}

.hermest-mbar__cta:hover,
.hermest-mbar__cta:focus {
	color: #fff;
}

.hermest-mbar__cta-label {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/*
 * Dar telefonlar (iPhone SE 320px): 17px'te yalnizca Ingilizce sigiyordu;
 * "Analyse capillaire gratuite" gibi metinler ucu kesik kaliyordu. Burada
 * yazi kuculup en fazla iki satira bolunuyor -- 46px yukseklik yetiyor.
 */
@media (max-width: 374px) {
	.hermest-mbar__cta {
		gap: 6px;
		padding: 0 12px;
		font-size: 13px;
		letter-spacing: 0;
	}

	.hermest-mbar__cta-label {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		white-space: normal;
		text-align: center;
		line-height: 1.15;
	}
}

.hermest-mbar__cta svg {
	flex: 0 0 auto;
	transition: transform 0.2s ease;
}

.hermest-mbar__cta[aria-expanded="true"] {
	background: var(--hermest-mbar-cta-active);
}

.hermest-mbar__cta[aria-expanded="true"] .hermest-mbar__chevron {
	transform: rotate(180deg);
}

.hermest-mbar__wa {
	flex: 0 0 46px;
	width: 46px;
	border-radius: 100px;
	background: var(--hermest-mbar-whatsapp);
}

.hermest-mbar__wa:hover,
.hermest-mbar__wa:focus {
	color: #fff;
}

.hermest-mbar__wa-close,
.hermest-mbar__wa[aria-expanded="true"] .hermest-mbar__wa-open {
	display: none;
}

.hermest-mbar__wa-open,
.hermest-mbar__wa[aria-expanded="true"] .hermest-mbar__wa-close {
	display: inline-flex;
}

/* Ikinci yerlesim: iki esit, koseli dugme; WhatsApp yazili. */
.hermest-mbar--split .hermest-mbar__cta,
.hermest-mbar--split .hermest-mbar__wa {
	flex: 1 1 0;
	width: auto;
	gap: 8px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 500;
}

.hermest-mbar__wa-label {
	font-size: 15px;
	font-weight: 500;
}

/* --- Acilan kartlar ------------------------------------------------------- */

.hermest-mbar__backdrop {
	position: fixed;
	inset: 0;
	z-index: 9988;
	background: rgb(6 24 32 / 55%);
	animation: hermest-mbar-fade 300ms ease-out;
}

.hermest-mbar__backdrop[hidden],
.hermest-mbar__sheet[hidden] {
	display: none;
}

/*
 * Alttan acilan panel (partners.hermestclinic.com'daki formun yontemi, 19
 * Ekim 2026): ekranin dibine tam genislikte yapisik, en fazla %92 yukseklik,
 * panelin TAMAMI kendi icinde kayiyor. Klavyeye ozel konumlandirma yok --
 * iPhone'da odaktaki alani iOS kendisi gosteriyor; onceki "yuzen kart +
 * visualViewport" yontemi iOS'un bu kaydirmasiyla catisiyordu.
 */
.hermest-mbar__sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9989;
	max-height: 92vh;
	max-height: 92dvh;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: #fff;
	border-radius: 26px 26px 0 0;
	box-shadow: 0 -20px 50px rgb(0 0 0 / 25%);
	color: var(--hermest-mbar-ink);
	animation: hermest-mbar-rise 380ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Ust ortadaki tutma cizgisi (yalniz gorsel). */
.hermest-mbar__handle {
	display: block;
	width: 40px;
	height: 4px;
	margin: 10px auto 0;
	border-radius: 4px;
	background: #d5dcdd;
}

.hermest-mbar__head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 12px 12px 14px;
	color: #fff;
}

/* Form panelinin basligi beyaz (partners tasarimi): koyu serif baslik, gri
   alt satir, acik gri yuvarlak X. */
.hermest-mbar__head--form {
	align-items: flex-start;
	padding: 18px 20px 2px;
	background: #fff;
	color: var(--hermest-mbar-ink);
}

/* Baslik tek satir: yazi ekran genisligiyle olcekleniyor (390px'te ~21px,
   en fazla 24px). En uzun baslik "Analyse capillaire gratuite" 360px'te de
   sigiyor; panelde daha uzunu yazilirsa ucu "..." ile kesiliyor. */
.hermest-mbar__head--form .hermest-mbar__title {
	overflow: hidden;
	color: var(--hermest-mbar-ink);
	font-size: clamp(17px, 5.4vw, 24px);
	line-height: 1.2;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.hermest-mbar__head--form .hermest-mbar__head-text {
	min-width: 0;
}

.hermest-mbar__head--form .hermest-mbar__head-text {
	gap: 8px;
}

.hermest-mbar__head--form .hermest-mbar__subtitle {
	overflow: visible;
	white-space: normal;
	color: #4a5a5d;
	font-size: 15px;
	line-height: 1.5;
}

.hermest-mbar__head--form .hermest-mbar__minimise {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	background: #eef3f4;
	color: var(--hermest-mbar-ink);
}

.hermest-mbar__head--form .hermest-mbar__minimise:hover,
.hermest-mbar__head--form .hermest-mbar__minimise:active {
	background: #e2eaec;
}

.hermest-mbar__head--chat {
	background: var(--hermest-mbar-chat-header);
}

.hermest-mbar__avatar {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	overflow: hidden;
	box-sizing: border-box;
	border: 2px solid #fff;
	border-radius: 100px;
	background: #f4f2ee;
}

.hermest-mbar__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.hermest-mbar__head-text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hermest-mbar__title {
	margin: 0;
	font-family: var(--hermest-font-heading, 'Source Serif 4', Georgia, serif);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
}

.hermest-mbar__subtitle,
.hermest-mbar__chat-status {
	margin: 0;
	font-size: 13px;
	line-height: 1.35;
	color: rgb(255 255 255 / 84%);
}

/* Basligin altindaki satir tek satir: iki satira dusunce kart basligi
   gereksiz yer kapliyordu. Panelde uzun bir metin yazilirsa ucu "..." ile
   kesiliyor; tamami title ozniteliginde. */
.hermest-mbar__subtitle {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 12.5px;
}

/* 360px ve daha dar telefonlarda hicbir dilin metni tek satira sigmiyor;
   orada kesmek yerine iki satira bolunuyor. */
@media (max-width: 374px) {
	.hermest-mbar__subtitle {
		white-space: normal;
	}
}

.hermest-mbar__chat-name {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	color: #fff;
}

.hermest-mbar__minimise {
	flex: 0 0 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 100px;
	/* Zemin hep gorunur: kapatma dugmesi oldugu dokunmadan da belli olsun
	   (telefonda hover yok). */
	background: rgb(255 255 255 / 16%);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.hermest-mbar__minimise:hover,
.hermest-mbar__minimise:active {
	background: rgb(255 255 255 / 26%);
}

/* Panelin tamami kayiyor; ic kutu ayrica kaymiyor. */
.hermest-mbar__scroll {
	overflow: visible;
}

/* --- Form karti ----------------------------------------------------------- */

.hermest-mbar__form {
	padding: 16px 20px 20px;
}

/* Gizlilik notu kartta daha siki (kisa metin + kucuk kutu): iki satir. */
.hermest-mbar__form .hermest-form-privacy-note {
	gap: 6px;
	padding: 8px 10px;
	font-size: 12px;
	line-height: 1.4;
}

/* Form kutusu kartta kendi golgesini ve zeminini tasimasin. */
.hermest-mbar__form .scfp-wrap {
	padding: 0;
	background: transparent;
	box-shadow: none;
}

.hermest-mbar__note {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0 16px 14px;
	font-size: 12px;
	line-height: 1.45;
	color: var(--hermest-mbar-muted);
}

.hermest-mbar__note svg {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	margin-top: 1px;
}

/* --- Sohbet karti --------------------------------------------------------- */

.hermest-mbar__chat-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px 14px 14px;
	background: #efeae2;
}

.hermest-mbar__day {
	align-self: center;
	padding: 4px 10px;
	border-radius: 8px;
	background: #fff;
	font-size: 12px;
	color: #4f5b5e;
}

.hermest-mbar__bubble {
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 86%;
	padding: 10px 12px 6px;
	border-radius: 4px 16px 16px 16px;
	background: #fff;
	box-shadow: 0 1px 1px rgb(14 42 48 / 10%);
}

.hermest-mbar__bubble-name {
	font-size: 13px;
	font-weight: 500;
	color: #0b6b5f;
}

.hermest-mbar__bubble-text {
	font-size: 15px;
	line-height: 1.45;
	color: #1f2b2e;
}

.hermest-mbar__bubble-time {
	align-self: flex-end;
	font-size: 11px;
	color: #5e6a6d;
}

.hermest-mbar__topics {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hermest-mbar__topic {
	min-height: 40px;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid #9ccfc4;
	border-radius: 100px;
	background: #fff;
	color: var(--hermest-mbar-chat-header);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.3;
	cursor: pointer;
}

.hermest-mbar__topic[aria-pressed="true"] {
	border-color: var(--hermest-mbar-chat-header);
	background: var(--hermest-mbar-chat-header);
	color: #fff;
}

.hermest-mbar__compose {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 10px 10px 12px;
	border-top: 1px solid #e6e2da;
}

.hermest-mbar__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	box-sizing: border-box;
	margin: 0;
	padding: 0 16px;
	border: 1px solid #dcd8cf;
	border-radius: 100px;
	background: #f4f2ee;
	color: var(--hermest-mbar-ink);
	font-family: inherit;
	/* 16px: iOS daha kucuk yazida odaklaninca sayfayi yakinlastiriyor. */
	font-size: 16px;
	outline: none;
}

.hermest-mbar__input:focus {
	border-color: var(--hermest-mbar-chat-header);
}

.hermest-mbar__send {
	flex: 0 0 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 100px;
	background: var(--hermest-mbar-whatsapp);
	color: #fff;
	cursor: pointer;
}

.hermest-mbar__footnote {
	flex: 0 0 auto;
	margin: 0;
	padding: 0 16px 12px;
	font-size: 12px;
	text-align: center;
	color: var(--hermest-mbar-muted);
}

.hermest-mbar .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* --- Baska katmanlarla birlikte ------------------------------------------ */

/* Panel acikken arkadaki sayfa kaymasin. Isareti mobile-bar.js koyuyor. */
html.hermest-mbar-open,
html.hermest-mbar-open body {
	overflow: hidden;
}

/* Panel acikken alttaki serit yok: panel ekranin dibini kapliyor; kapatma
   paneldeki X ve karartilmis zemin. */
html.hermest-mbar-open .hermest-mbar__bar {
	display: none;
}

/* Kart acikken yukari-cik dugmesi karartilmis zeminde kalmasin. */
html.hermest-mbar-open .hermest-back-to-top {
	display: none;
}

/*
 * Telefon alanindaki ulke secici (Stella'nin intl-tel-input v18'i).
 * Telefonda listeyi <body>'nin sonuna tam ekran aciyor (.iti--container) ama
 * z-index'i 1060: form kartinin (9989) ve popup penceresinin (10000) ARKASINDA
 * kaliyordu -- ulke kodu secilemiyordu. Her ikisinin ustune aliniyor.
 * "body" on eki sart: eklentinin stili formla birlikte <body> icinde, bu
 * dosyadan SONRA basiliyor ve ayni ozgullukteki kural onu eziyordu.
 */
body .iti--container {
	z-index: 10050;
}

/* Popup penceresi ve mobil menu acikken serit yok: ikisi de tam ekran. */
.hermest-popup-open .hermest-mbar,
body.hermest-menu-open .hermest-mbar {
	display: none !important;
}

@keyframes hermest-mbar-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes hermest-mbar-rise {
	from { transform: translateY(105%); }
	to   { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.hermest-mbar__backdrop,
	.hermest-mbar__sheet {
		animation: none;
	}

	.hermest-mbar__cta,
	.hermest-mbar__wa,
	.hermest-mbar__cta svg {
		transition: none;
	}
}
