/* YatraKraft — global header tweaks (profile icon) */

/* Note: never set `display` on .header-desktop — the parent theme hides it on mobile. */
.site-header .header-desktop { align-items: center; }
.site-header .header-desktop .travelscape-menu-wrap { margin-left: auto; }

.yk-account-link {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 44px; height: 44px; margin-left: 20px; border-radius: 50%;
	background: #fff; border: 1px solid #dfe6ea; color: #0f2230 !important;
	box-shadow: 0 1px 2px rgba(15, 34, 48, .06);
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
	text-decoration: none !important;
}
.yk-account-link svg { width: 21px; height: 21px; fill: currentColor; }
.yk-account-link:hover,
.yk-account-link:focus-visible { background: #0b5a86; border-color: #0b5a86; color: #fff !important; transform: translateY(-1px); }
.yk-account-link:focus-visible { outline: 3px solid rgba(11, 90, 134, .3); outline-offset: 2px; }
.yk-account-link.is-logged-in { border-color: #0b5a86; color: #0b5a86 !important; }
.yk-account-link.is-logged-in:hover { color: #fff !important; }

/* Logged in: photo (or Gravatar) layered over the user's initials. */
.yk-account-link.is-logged-in { position: relative; overflow: hidden; background: #eaf2f7; border-width: 2px; }
.yk-account-link__initials { font-family: 'Outfit', system-ui, sans-serif; font-size: 15px; font-weight: 700; line-height: 1; letter-spacing: .02em; }
.yk-account-link__photo {
	position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none;
	border-radius: 50%; object-fit: cover;
}
.yk-account-link.is-logged-in:hover,
.yk-account-link.is-logged-in:focus-visible { background: #0b5a86; box-shadow: 0 0 0 3px rgba(11, 90, 134, .25); }

/* Desktop: the theme's nav has 10px top / 0 bottom padding, so its text sits ~5px
   below the header's centre line. Match that offset so the icon lines up with the menu text. */
.site-header .header-desktop .yk-account-link { margin-top: 10px; }

/* Mobile header: logo left, then profile icon + hamburger, all on one centre line.
   The hamburger is an inline SVG inside a link, which adds a text-baseline gap under it
   and throws off its centre — so both buttons get the same fixed-height flex box. */
.site-header .header-mobile .top-wrap { display: flex; flex-wrap: nowrap; align-items: center; }
.site-header .header-mobile .top-wrap .site-branding { min-width: 0; flex: 1 1 auto; margin-top: 0; margin-bottom: 0; }
.site-header .header-mobile .top-wrap .yk-account-link,
.site-header .header-mobile .top-wrap .menu-toggle {
	align-self: center; flex: none; margin-top: 0; margin-bottom: 0; box-sizing: border-box;
}
.site-header .header-mobile .top-wrap .yk-account-link { width: 40px; height: 40px; margin-left: 12px; margin-right: 8px; }
.site-header .header-mobile .top-wrap .menu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; line-height: 0;
}
.site-header .header-mobile .top-wrap .menu-toggle svg { display: block; width: 30px; height: 30px; }

/* ---------- Floating WhatsApp + back-to-top (inc/floating-buttons.php) ---------- */
.yk-float {
	position: fixed; z-index: 900;
	right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
	pointer-events: none;
}
.yk-float > * { pointer-events: auto; }
.yk-float svg { display: block; fill: currentColor; }

.yk-float__wa,
.yk-float__wa:visited {
	display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 16px;
	border-radius: 999px; background: #1faa59; color: #fff !important; text-decoration: none !important;
	font-family: 'Inter', system-ui, sans-serif; font-size: 15px; font-weight: 600; line-height: 1;
	box-shadow: 0 10px 24px rgba(31, 170, 89, .35), 0 2px 6px rgba(15, 34, 48, .15);
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.yk-float__wa svg { width: 26px; height: 26px; flex: none; }
.yk-float__wa:hover { background: #17924b; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(31, 170, 89, .4), 0 2px 6px rgba(15, 34, 48, .15); }
.yk-float__wa:focus-visible { outline: 3px solid rgba(31, 170, 89, .45); outline-offset: 3px; }

.yk-float__top {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 6px 0 0; padding: 0;
	border: 1px solid #dfe6ea; border-radius: 50%; background: #fff; color: #0b5a86; cursor: pointer;
	box-shadow: 0 6px 18px rgba(15, 34, 48, .14);
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s, background-color .15s ease, color .15s ease;
}
.yk-float__top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s, background-color .15s ease, color .15s ease; }
.yk-float__top svg { width: 24px; height: 24px; }
.yk-float__top:hover { background: #0b5a86; border-color: #0b5a86; color: #fff; }
.yk-float__top:focus-visible { outline: 3px solid rgba(11, 90, 134, .35); outline-offset: 2px; }

@media (max-width: 768px) {
	.yk-float { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
	.yk-float__wa { width: 54px; height: 54px; padding: 0; justify-content: center; }
	.yk-float__wa-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.yk-float__wa svg { width: 28px; height: 28px; }
	.yk-float__top { width: 42px; height: 42px; margin-right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
	.yk-float__wa, .yk-float__top { transition: none; }
}
@media print { .yk-float { display: none; } }
