/* Happy Smiles child theme — direction A („Академичен почерк“).
   Palette: docs/WEBSITE_CREATIVE_DIRECTIONS.md §2 (to be calibrated against the logo files). */

/* ---------- Fonts (self-hosted, SIL OFL 1.1, Cyrillic + Latin subsets) ---------- */

@font-face {
	/* Modified Version of Source Serif 4 (Adobe), renamed per the OFL Reserved Font Name "Source".
	   See ../fonts/LICENSE-HappySmilesSerif.md. */
	font-family: "Happy Smiles Serif";
	src: url("../fonts/HappySmilesSerif.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Manrope";
	src: url("../fonts/Manrope.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
	--hs-navy: #14233a;
	--hs-ivory: #f7f3ec;
	--hs-slate: #2b3645;
	--hs-slate-muted: #5e6673;
	--hs-turquoise-deep: #0e6f78;
	--hs-turquoise-bright: #3cc6c8;
	--hs-stone: #d9cfc1;

	--hs-font-headings: "Happy Smiles Serif", Georgia, "Times New Roman", serif;
	--hs-font-text: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--hs-callbar-height: 56px;
}

/* Defaults when an Elementor widget has no typography set. */
body {
	font-family: var(--hs-font-text);
	color: var(--hs-slate);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--hs-font-headings);
	color: var(--hs-navy);
}

/* Elementor system typography variables (used when the kit keeps the default global slots). */
body[class*="elementor-kit-"] {
	--e-global-typography-primary-font-family: "Happy Smiles Serif";
	--e-global-typography-secondary-font-family: "Happy Smiles Serif";
	--e-global-typography-text-font-family: "Manrope";
	--e-global-typography-accent-font-family: "Manrope";
}

/* Visible keyboard focus. */
a:focus-visible,
button:focus-visible {
	outline: 3px solid var(--hs-turquoise-deep);
	outline-offset: 2px;
}

/* On the navy call bar the deep turquoise is below 3:1, so use ivory. */
.hs-callbar a:focus-visible {
	outline-color: var(--hs-ivory);
}

/* ---------- Mobile call bar ---------- */

.hs-callbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
	background: var(--hs-navy);
	box-shadow: 0 -2px 8px rgba(20, 35, 58, 0.2);
}

.hs-callbar__btn {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 10px 16px;
	border-radius: 8px;
	font-family: var(--hs-font-text);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.hs-callbar__btn--call {
	background: var(--hs-ivory);
	color: var(--hs-navy);
}

.hs-callbar__btn--viber {
	background: transparent;
	color: var(--hs-ivory);
	border: 2px solid var(--hs-ivory);
}

.hs-callbar__btn:hover,
.hs-callbar__btn:focus-visible {
	text-decoration: underline;
}

.hs-callbar__note {
	flex-basis: 100%;
	margin: 0;
	font-family: var(--hs-font-text);
	font-size: 0.8125rem;
	line-height: 1.35;
	color: var(--hs-ivory);
}

/* Keep page content, and anything scrolled into view by keyboard focus, clear of the bar.
   The bar is taller when the Viber note is shown (class added by functions.php). */
@media (max-width: 1023.98px) {
	body:not(.elementor-editor-active) {
		padding-bottom: calc(var(--hs-callbar-height) + env(safe-area-inset-bottom));
	}

	body.hs-has-viber-note:not(.elementor-editor-active) {
		padding-bottom: calc(var(--hs-callbar-height) * 2 + env(safe-area-inset-bottom));
	}

	html {
		scroll-padding-bottom: calc(var(--hs-callbar-height) * 2 + env(safe-area-inset-bottom));
	}
}

@media (min-width: 1024px) {
	.hs-callbar {
		display: none;
	}
}

@media print {
	.hs-callbar {
		display: none;
	}
}
