/* WP Float Hub – Frontend Styles */

/* =====================================================
   Base widget container
   ===================================================== */
.fh-widget {
	position: fixed;
	z-index: 9999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}

.fh-widget *,
.fh-widget *::before,
.fh-widget *::after {
	box-sizing: inherit;
	box-shadow: none !important;
}

/* =====================================================
   Toggle button
   ===================================================== */
.fh-toggle-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	cursor: pointer;
	border-radius: 50%;
	background: var(--fh-primary, #0073aa);
	color: #fff;
	transition: transform 0.2s ease;
	padding: 0;
	position: relative;
	outline-offset: 3px;
}

.fh-toggle-btn:hover {
	filter: brightness(1.1);
}

.fh-toggle-btn:focus-visible {
}

.fh-btn-img {
	width: 55%;
	height: 55%;
	object-fit: contain;
	pointer-events: none;
	transition: transform 0.3s ease;
}

.fh-toggle-btn.fh-btn-has-image {
	background: transparent;
	border-radius: 0;
	border: none;
	padding: 0;
	width: auto !important;
	height: auto !important;
}

.fh-toggle-btn.fh-btn-has-image .fh-btn-img {
	display: block;
	width: 60px;
	height: 60px;
	object-fit: contain;
}

.fh-toggle-btn.fh-btn-has-image:hover {
	transform: none;
}

.fh-toggle-btn.fh-btn-has-image:focus-visible {
	outline: 3px solid var(--fh-primary, #0073aa);
	outline-offset: 3px;
}

.fh-toggle-btn.fh-btn-rotated .fh-btn-img {
	transform: rotate(360deg);
}

/* Variant: icon + text */
.fh-btn-variant-icon_text {
	border-radius: var(--fh-radius, 12px);
	padding: 0 14px;
	min-width: var(--fh-btn-size, 56px);
}

.fh-btn-label {
	font-size: 0.85em;
	font-weight: 600;
	white-space: nowrap;
}

/* =====================================================
   Panel – base
   ===================================================== */
.fh-panel {
	position: absolute;
	min-width: 300px;
	max-width: 420px;
	background: var(--fh-bg-panel, #ffffff);
	color: var(--fh-text, #333333);
	border-radius: var(--fh-radius, 12px);
	overflow: hidden;
	will-change: transform, opacity;
}

.fh-panel--contact-open {
	min-width: 380px;
	max-width: 480px;
}

/* Position the panel relative to the button */
.fh-pos-bottom .fh-pos-right .fh-panel,
.fh-pos-right .fh-panel {
	bottom: calc(var(--fh-btn-size, 56px) + 12px);
	right: 0;
}

.fh-pos-left .fh-panel {
	bottom: calc(var(--fh-btn-size, 56px) + 12px);
	left: 0;
}

.fh-pos-top .fh-panel {
	top: calc(var(--fh-btn-size, 56px) + 12px);
	right: 0;
}

.fh-pos-top.fh-pos-left .fh-panel {
	top: calc(var(--fh-btn-size, 56px) + 12px);
	left: 0;
}

/* Keep panel within viewport – handled by JS too */
.fh-panel {
	bottom: calc(var(--fh-btn-size, 56px) + 12px);
	right: 0;
}

.fh-panel[hidden] {
	display: none;
}

/* Panel header (close button row) */
.fh-panel-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 16px 16px 8px;
	min-height: 36px;
	position: relative;
	background: transparent;
}

.fh-panel-header-title {
	flex: 1;
	font-size: 1.3em;
	font-weight: 700;
	color: #bcb45d;
	padding-left: 0;
}

/* Estilos para panel de contacto abierto */
.fh-panel--contact-open .fh-panel-header {
	padding: 20px 20px 16px;
}

.fh-panel--contact-open .fh-panel-header-title {
	font-size: 1.5em;
	color: #bcb45d;
}

.fh-panel-close {
	background: transparent !important;
	border: none;
	cursor: pointer;
	color: #bcb45d !important;
	opacity: 1;
	padding: 4px;
	line-height: 1;
	border-radius: 4px;
	transition: opacity 0.15s;
	flex-shrink: 0;
	font-size: 1.5em;
}

.fh-panel-close:hover {
	opacity: 0.7;
}

/* =====================================================
   Style: Flat
   ===================================================== */
.fh-style-flat .fh-panel {
	border: 2px solid var(--fh-primary, #0073aa);
}

.fh-style-flat .fh-toggle-btn {
	border-radius: 4px;
	border: 2px solid rgba(255,255,255,0.3);
}

/* =====================================================
   Style: Glass
   ===================================================== */
.fh-style-glass .fh-panel {
	background: rgba(255,255,255,0.72);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border: 1px solid rgba(255,255,255,0.4);
}

.fh-style-glass .fh-toggle-btn {
	background: rgba(0, 115, 170, 0.85);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

/* =====================================================
   Style: Material
   ===================================================== */
.fh-style-material .fh-panel {
}

.fh-style-material .fh-toggle-btn {
}

.fh-style-material .fh-toggle-btn:hover {
}


/* =====================================================
   Style: Neumorphic
   ===================================================== */
.fh-style-neumorphic .fh-panel {
	background: #e8ecef;
	border: none;
}

.fh-style-neumorphic .fh-toggle-btn {
	background: #e8ecef;
	color: var(--fh-primary, #0073aa);
	
}

.fh-style-neumorphic .fh-toggle-btn:hover {

}

.fh-style-neumorphic .fh-btn-img {
	filter: none;
}

/* =====================================================
   Opening animations
   ===================================================== */

/* --- Popup (default) --- */
.fh-open-popup .fh-panel {
	transform-origin: bottom right;
}
.fh-open-popup.fh-pos-left .fh-panel {
	transform-origin: bottom left;
}
.fh-open-popup.fh-pos-top .fh-panel {
	transform-origin: top right;
}
.fh-open-popup.fh-pos-top.fh-pos-left .fh-panel {
	transform-origin: top left;
}

.fh-open-popup .fh-panel--entering {
	animation: fh-popup-in 250ms ease-out forwards;
}
.fh-open-popup .fh-panel--leaving {
	animation: fh-popup-out 200ms ease-in forwards;
}

@keyframes fh-popup-in {
	from { opacity: 0; transform: scale(0.8); }
	to   { opacity: 1; transform: scale(1); }
}
@keyframes fh-popup-out {
	from { opacity: 1; transform: scale(1); }
	to   { opacity: 0; transform: scale(0.8); }
}

/* --- Slide --- */
.fh-open-slide .fh-panel {
	position: fixed;
}
.fh-open-slide.fh-pos-right .fh-panel {
	right: 0;
	top: 0;
	bottom: 0;
	left: auto;
	height: 100%;
	border-radius: 0;
	max-width: 340px;
	overflow-y: auto;
}
.fh-open-slide.fh-pos-left .fh-panel {
	left: 0;
	right: auto;
	top: 0;
	bottom: 0;
	height: 100%;
	border-radius: 0;
	max-width: 340px;
	overflow-y: auto;
}
.fh-open-slide.fh-pos-bottom .fh-panel {
	bottom: 0;
	left: 0;
	right: 0;
	top: auto;
	width: 100%;
	max-width: 100%;
	border-radius: var(--fh-radius, 12px) var(--fh-radius, 12px) 0 0;
}
.fh-open-slide.fh-pos-top .fh-panel {
	top: 0;
	left: 0;
	right: 0;
	bottom: auto;
	width: 100%;
	max-width: 100%;
	border-radius: 0 0 var(--fh-radius, 12px) var(--fh-radius, 12px);
}

.fh-open-slide.fh-pos-right .fh-panel--entering {
	animation: fh-slide-right-in 300ms ease-out forwards;
}
.fh-open-slide.fh-pos-right .fh-panel--leaving {
	animation: fh-slide-right-out 300ms ease-in forwards;
}
.fh-open-slide.fh-pos-left .fh-panel--entering {
	animation: fh-slide-left-in 300ms ease-out forwards;
}
.fh-open-slide.fh-pos-left .fh-panel--leaving {
	animation: fh-slide-left-out 300ms ease-in forwards;
}

@keyframes fh-slide-right-in  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fh-slide-right-out { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes fh-slide-left-in   { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes fh-slide-left-out  { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* --- Edge bar --- */
.fh-open-edge .fh-panel {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	top: auto;
	width: 100%;
	max-width: 100%;
	border-radius: 0;
	padding: 12px 24px;
	display: flex;
	gap: 20px;
	align-items: flex-start;
	overflow-x: auto;
}
.fh-open-edge.fh-pos-top .fh-panel {
	top: 0;
	bottom: auto;
}
.fh-open-edge .fh-panel--entering {
	animation: fh-edge-in 300ms ease-out forwards;
}
.fh-open-edge .fh-panel--leaving {
	animation: fh-edge-out 300ms ease-in forwards;
}
@keyframes fh-edge-in  { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fh-edge-out { from { transform: translateY(0); } to { transform: translateY(100%); } }

/* --- Circular menu (panel hidden; items positioned by JS) --- */
.fh-open-circular .fh-panel {
	background: transparent;
	border: none;
	overflow: visible;
	min-width: 0;
	max-width: none;
}

.fh-circular-item {
	position: absolute;
	transform-origin: center center;
	animation: fh-circular-appear 200ms ease-out forwards;
	opacity: 0;
}

@keyframes fh-circular-appear {
	from { opacity: 0; transform: scale(0.6); }
	to   { opacity: 1; transform: scale(1); }
}

/* =====================================================
   Modules
   ===================================================== */
.fh-modules {
	padding: 12px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-height: 80vh;
	overflow-y: auto;
}

.fh-module {
	width: 100%;
}

/* =====================================================
   Module: Quick Pages
   ===================================================== */
.fh-quick-pages-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.fh-quick-page-item {
	display: block;
}

.fh-quick-page-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-radius: 25px;
	color: #bcb45d !important;
	text-decoration: none;
	font-size: 0.95em;
	font-weight: 600;
	transition: background 0.15s, color 0.15s;
	background: transparent !important;
	border: none;
}

.fh-quick-page-link:hover {
	background: rgba(188, 180, 93, 0.1) !important;
	color: #bcb45d !important;
}

.fh-item-icon {
	font-size: 1.2em;
	line-height: 1;
	flex-shrink: 0;
	width: 22px;
	text-align: center;
}

.fh-item-label {
	flex: 1;
}

/* =====================================================
   Module: Search
   ===================================================== */
.fh-search-form {
	display: block;
}

.fh-search-row {
	display: flex;
	border-radius: calc(var(--fh-radius, 12px) - 4px);
	overflow: hidden;
}

.fh-search-input {
	flex: 1;
	padding: 9px 12px;
	border: none;
	background: transparent;
	color: var(--fh-text, #333);
	font-size: 0.9em;
	outline: none;
	margin-right: 10px;
}

.fh-search-input::placeholder {
	color: rgba(0,0,0,0.35);
}

.fh-search-btn {
	background: var(--fh-primary, #0073aa);
	border: none;
	color: #fff;
	padding: 0 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: opacity 0.15s;
}

.fh-search-btn:hover {
	opacity: 0.85;
}

/* =====================================================
   Module: Contact Form
   ===================================================== */

/* Contact title button inherits fh-quick-page-link styles */
button.fh-quick-page-link {
	width: 100%;
	background: transparent;
	border: none;
	font-family: inherit;
	cursor: pointer;
	text-align: left;
}

button.fh-quick-page-link .fh-chevron {
	margin-left: auto;
	opacity: 0.6;
}

.fh-contact-panel {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* When contact panel is promoted to .fh-panel level */
.fh-panel--contact-open > .fh-contact-panel {
	padding: 0 20px 24px;
}

/* When newsletter panel is promoted to .fh-panel level */
.fh-panel--newsletter-open > .fh-newsletter-panel {
	padding: 0 16px 16px;
}

.fh-contact-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* Honeypot – screen-reader only, invisible */
.fh-hp {
	position: absolute;
	left: -9999px;
	opacity: 0;
	pointer-events: none;
	tab-index: -1;
}

.fh-field-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fh-field-group label {
	font-size: 0.9em;
	font-weight: 600;
	color: #813b51;
	opacity: 1;
}

.fh-input,
.fh-textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid rgba(129, 59, 81, 0.25);
	border-radius: 10px;
	background: #ffffff !important;
	color: #333 !important;
	color-scheme: light;
	font-size: 0.9em;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s;
}

.fh-input:focus,
.fh-textarea:focus {
	border-color: #813b51;
}

.fh-input::placeholder,
.fh-textarea::placeholder {
	color: rgba(129, 59, 81, 0.4);
}

.fh-textarea {
	resize: vertical;
	min-height: 120px;
}

.fh-field-error {
	font-size: 0.78em;
	color: #d63638;
	min-height: 1.2em;
}

.fh-input.fh-input--error,
.fh-textarea.fh-input--error {
	border-color: #d63638;
}

.fh-form-footer {
	display: flex;
	justify-content: flex-end;
	padding-top: 8px;
}

.fh-form-footer--left {
	justify-content: flex-start;
}

.fh-form-footer--right {
	justify-content: flex-end;
}

.fh-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 28px;
	background: #a1acd4;
	color: #fff;
	border: none;
	border-radius: 25px;
	cursor: pointer;
	font-size: 0.9em;
	font-weight: 600;
	transition: opacity 0.15s;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.fh-submit-btn:hover {
	opacity: 0.88;
}

.fh-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.fh-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255,255,255,0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: fh-spin 0.7s linear infinite;
}

@keyframes fh-spin {
	to { transform: rotate(360deg); }
}

.fh-form-feedback {
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 0.88em;
	text-align: center;
}

.fh-form-feedback--success {
	background: #edfaed;
	color: #1e7e34;
	border: 1px solid #b8e2b8;
}

.fh-form-feedback--error {
	background: #fde8e8;
	color: #a00;
	border: 1px solid #f5c6c6;
}

.fh-form-feedback[hidden] {
	display: none;
}

/* =====================================================
   Dark mode – auto (follows OS + body class/attr)
   ===================================================== */
@media (prefers-color-scheme: dark) {
	.fh-dark-auto .fh-panel {
		--fh-bg-panel: rgba(28, 28, 32, 0.97);
		--fh-text: #e2e2e6;
		--fh-input-bg: rgba(255,255,255,0.12);
		--fh-input-border: rgba(255,255,255,0.18);
	}
	.fh-dark-auto .fh-style-glass .fh-panel {
		background: rgba(28,28,32,0.78);
		border-color: rgba(255,255,255,0.08);
	}
	.fh-dark-auto .fh-search-input::placeholder {
		color: rgba(255,255,255,0.35);
	}
	.fh-dark-auto .fh-input,
	.fh-dark-auto .fh-textarea {
		color-scheme: light;
	}
}

body.dark .fh-dark-auto .fh-panel,
body[data-theme="dark"] .fh-dark-auto .fh-panel {
	--fh-bg-panel: rgba(28, 28, 32, 0.97);
	--fh-text: #e2e2e6;
	--fh-input-bg: rgba(255,255,255,0.12);
	--fh-input-border: rgba(255,255,255,0.18);
}

body.dark .fh-dark-auto .fh-input,
body.dark .fh-dark-auto .fh-textarea,
body[data-theme="dark"] .fh-dark-auto .fh-input,
body[data-theme="dark"] .fh-dark-auto .fh-textarea {
	color-scheme: light;
}

/* Always dark */
.fh-dark-dark .fh-panel {
	--fh-bg-panel: rgba(28, 28, 32, 0.97);
	--fh-text: #e2e2e6;
	--fh-input-bg: rgba(255,255,255,0.12);
	--fh-input-border: rgba(255,255,255,0.18);
}

.fh-dark-dark .fh-input,
.fh-dark-dark .fh-textarea {
	color-scheme: light;
}

/* =====================================================
   Reduced motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
	.fh-open-popup .fh-panel--entering,
	.fh-open-popup .fh-panel--leaving,
	.fh-open-slide .fh-panel--entering,
	.fh-open-slide .fh-panel--leaving,
	.fh-open-edge .fh-panel--entering,
	.fh-open-edge .fh-panel--leaving,
	.fh-circular-item {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* =====================================================
   Shortcode newsletter inline
   ===================================================== */
.fh-shortcode-newsletter {
	display: block;
	width: 100%;
}

.fh-newsletter-form--inline .fh-newsletter-inline-row {
	display: flex;
	gap: 8px;
	align-items: center;
	width: 100%;
}

.fh-newsletter-form--inline .fh-field-group {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.fh-newsletter-form--inline .fh-input {
	flex: 1;
	min-width: 0;
}

.fh-shortcode-newsletter .fh-input {
	background: #ffffff !important;
	color: #813b51 !important;
	border-radius: 25px !important;
	border-color: rgba(129, 59, 81, 0.25) !important;
	padding-left: 18px !important;
}

.fh-shortcode-newsletter .fh-submit-btn {
	background: #a1acd4 !important;
	color: #ffffff !important;
	border-radius: 25px !important;
}

.fh-shortcode-newsletter .fh-input::placeholder {
	color: rgba(129, 59, 81, 0.5);
}

.fh-shortcode-newsletter .fh-input:focus {
	border-color: #813b51 !important;
}

.fh-newsletter-form--inline .fh-submit-btn {
	white-space: nowrap;
	flex-shrink: 0;
}

.fh-newsletter-form--inline .fh-field-error {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: #c00;
}

.fh-newsletter-form--inline .fh-form-feedback--sc {
	margin-top: 8px;
	font-size: 13px;
	padding: 6px 10px;
	border-radius: 4px;
}

.fh-newsletter-form--vertical .fh-newsletter-inline-row {
	flex-direction: column;
	align-items: stretch;
}

.fh-newsletter-form--vertical .fh-submit-btn {
	width: 100%;
}

@media (max-width: 480px) {
	.fh-newsletter-form--inline .fh-newsletter-inline-row {
		flex-direction: column;
		align-items: stretch;
	}
}
