/*
 * Traductia — custom CSS layered on top of Tailwind.
 * Tailwind utilities are loaded via CDN with the design-token config defined
 * in inc/enqueue.php. Anything that can't be expressed in a utility lives here.
 */

html {
	scroll-behavior: smooth;
	scroll-padding-top: 112px;
}

body {
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Material Symbols default sizing tweak — Tailwind's text-* classes can be used too */
.material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
	vertical-align: middle;
}

/* WP admin bar offset */
body.admin-bar header.fixed {
	top: 32px;
}
@media screen and (max-width: 782px) {
	body.admin-bar header.fixed {
		top: 46px;
	}
}

/* Strip default WP custom-logo wrapper styling so it sits cleanly in the nav */
.custom-logo-link {
	display: inline-flex;
	align-items: center;
}
/* Force the WP custom logo (uploaded via Personalizar) to match the theme size.
   !important overrides any inline width/height attributes that WP outputs on the <img>. */
header .custom-logo {
	height: 56px !important;
	max-height: 56px !important;
	width: auto !important;
	max-width: none !important;
}
@media (min-width: 768px) {
	header .custom-logo {
		height: 64px !important;
		max-height: 64px !important;
	}
}

/* Nav menu items emitted by wp_nav_menu shouldn't carry list bullets */
header nav ul,
footer nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

/* Helpful prose defaults for page.php / single.php */
.prose h2,
.prose h3 {
	font-family: 'Playfair Display', serif;
	color: var(--tw-prose-headings, #000);
}
.prose a {
	color: #12183c;
	text-decoration: underline;
}

/* Active page in the WP nav menus (not the #anchor links WP also marks as current) */
header .current_page_item > a > span,
header .current-menu-item.menu-item-home > a > span {
	color: #fff;
	box-shadow: inset 0 -2px 0 #e9c176;
	padding-bottom: 4px;
}

/* FAQ accordion: hide the native disclosure marker */
details > summary::-webkit-details-marker {
	display: none;
}

/* WhatsApp bubble ------------------------------------------------------- */
.wa-bubble {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: 'Inter', system-ui, sans-serif;
}
.wa-bubble__btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 9999px;
	background: #25d366;
	color: #fff;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-bubble__btn::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: #25d366;
	opacity: 0.45;
	z-index: -1;
	animation: wa-pulse 2.4s ease-out infinite;
}
.wa-bubble__btn:hover {
	transform: scale(1.08);
	box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.35);
}
.wa-bubble__btn:focus-visible,
.wa-bubble__cta:focus-visible,
.wa-bubble__close:focus-visible {
	outline: 3px solid #12183c;
	outline-offset: 3px;
}
.wa-bubble__tip {
	position: absolute;
	right: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
	white-space: nowrap;
	background: #fff;
	color: #12183c;
	font-size: 14px;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: 6px;
	border: 1px solid #c7c5cf;
	box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.2);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.wa-bubble__btn:hover .wa-bubble__tip,
.wa-bubble__btn:focus-visible .wa-bubble__tip {
	opacity: 1;
}
.wa-bubble__card {
	position: relative;
	width: 300px;
	max-width: calc(100vw - 32px);
	background: #fff;
	color: #1b1c1c;
	border-radius: 14px;
	box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.35);
	padding: 18px;
	transform-origin: bottom right;
	animation: wa-in 0.25s ease-out;
}
.wa-bubble__card[hidden] {
	display: none;
}
.wa-bubble__card::after {
	content: '';
	position: absolute;
	right: 22px;
	bottom: -8px;
	width: 16px;
	height: 16px;
	background: #fff;
	transform: rotate(45deg);
}
.wa-bubble__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	color: #64748b;
	background: transparent;
	cursor: pointer;
}
.wa-bubble__close:hover {
	background: #f0eded;
	color: #1b1c1c;
}
.wa-bubble__close .material-symbols-outlined {
	font-size: 20px;
}
.wa-bubble__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-right: 28px;
	margin-bottom: 12px;
}
.wa-bubble__head img {
	width: 40px;
	height: 40px;
	border-radius: 9999px;
	object-fit: contain;
	background: #12183c;
	padding: 4px;
}
.wa-bubble__name {
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	color: #12183c;
}
.wa-bubble__status {
	font-size: 12px;
	color: #64748b;
	line-height: 1.3;
}
.wa-bubble__msg {
	background: #f6f3f2;
	border-radius: 0 10px 10px 10px;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 14px;
}
.wa-bubble__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 11px 16px;
	border-radius: 9999px;
	background: #25d366;
	color: #0b3d1e;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	transition: filter 0.2s ease;
}
.wa-bubble__cta:hover {
	filter: brightness(0.95);
}
@media (max-width: 640px) {
	.wa-bubble {
		right: 16px;
		bottom: 16px;
	}
	.wa-bubble__btn {
		width: 56px;
		height: 56px;
	}
	.wa-bubble__tip {
		display: none;
	}
}
@keyframes wa-pulse {
	0% { transform: scale(1); opacity: 0.45; }
	70%, 100% { transform: scale(1.6); opacity: 0; }
}
@keyframes wa-in {
	from { transform: translateY(8px) scale(0.96); opacity: 0; }
	to { transform: none; opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
