/*
 * Gift Lab Button Effects 1.1.4
 *
 * Un unico efecto para TODOS los botones con texto del sitio, copiado del boton de referencia
 * de la home ("Let's Make Gifting Part of Your Business Strategy", .gl-cg a.gl-btn):
 *   reposo : relleno vino #4D0E12, texto blanco, borde del mismo vino
 *   hover  : relleno transparente, texto y borde vino; transition: all .25s
 * Excepcion de legibilidad: si el boton esta sobre una foto (clase .glbe-img, la pone el JS),
 * en hover el relleno pasa a blanco en lugar de transparente, porque el vino sobre una foto no
 * garantiza contraste 4.5:1 y el texto no puede desaparecer.
 * No cambia tamanos ni tipografia: los botones sin borde dibujan el aro con box-shadow inset.
 * Especificidad: html body + :not(#gl-x) + !important para ganar al tema, Elementor y plugins.
 */

:root { --glbe-wine: #4d0e12; --glbe-red: #be0000; }

/* ---- 1. Reposo ---- */
html body :is(
	a.sc_button:not(.sc_button_simple), .elementor-button, .wp-block-button__link, .wp-block-search__button,
	a.button, button.button, input.button, a.checkout-button, a.added_to_cart, .wc-forward,
	button.single_add_to_cart_button, button[name="update_cart"], button[name="calc_shipping"], button[name="apply_coupon"],
	button#place_order, button.woocommerce-Button, button.woocommerce-button,
	button.woocommerce-form-login__submit, button.woocommerce-form-register__submit,
	.wpcf7-submit, .gl-btn, .gl-ct-btn, .glwp-btn, .comment-form .submit, .comment-form input[type="submit"],
	.widget_search button, .widget_product_search button, .woocommerce-product-search button,
	.pum-container .button, .pum-container button[type="submit"], .pum-container input[type="submit"],
	.more-link, .post_readmore, a.theme_button
):not(#gl-x):not(.gl-cg a.gl-btn):not(.icons a):not(.glwp-x):not(.search_wrap *):not(.gl-prev):not(.gl-next) {
	background-color: var(--glbe-wine) !important;
	background-image: none !important;
	color: #fff !important;
	border-color: var(--glbe-wine) !important;
	text-shadow: none !important;
	transition: all .25s !important;
}

/* ---- 2. Hover / foco ---- */
html body :is(
	a.sc_button:not(.sc_button_simple), .elementor-button, .wp-block-button__link, .wp-block-search__button,
	a.button, button.button, input.button, a.checkout-button, a.added_to_cart, .wc-forward,
	button.single_add_to_cart_button, button[name="update_cart"], button[name="calc_shipping"], button[name="apply_coupon"],
	button#place_order, button.woocommerce-Button, button.woocommerce-button,
	button.woocommerce-form-login__submit, button.woocommerce-form-register__submit,
	.wpcf7-submit, .gl-btn, .gl-ct-btn, .glwp-btn, .comment-form .submit, .comment-form input[type="submit"],
	.widget_search button, .widget_product_search button, .woocommerce-product-search button,
	.pum-container .button, .pum-container button[type="submit"], .pum-container input[type="submit"],
	.more-link, .post_readmore, a.theme_button
):not(#gl-x):not(.gl-cg a.gl-btn):not(.icons a):not(.glwp-x):not(.search_wrap *):not(.gl-prev):not(.gl-next):not(:disabled):not(.disabled):is(:hover, :focus-visible) {
	background-color: transparent !important;
	background-image: none !important;
	color: var(--glbe-wine) !important;
	border-color: var(--glbe-wine) !important;
	box-shadow: none !important;
	transform: none !important;
}
/* Sobre foto: relleno blanco en hover para que el texto vino se lea */
html body .glbe.glbe-img:not(#gl-x):not(#gl-y):not(#gl-z):not(:disabled):not(.disabled):is(:hover, :focus-visible) {
	background-color: #fff !important;
}
/* Sobre color oscuro solido (p. ej. secciones vino): el vino no se distingue del fondo.
   Reposo con aro blanco de 1px; hover vaciado con texto y aro blancos. */
html body .glbe.glbe-dark:not(#gl-x):not(#gl-y):not(#gl-z) {
	border-color: #fff !important;
}
html body .glbe.glbe-dark.glbe-nb:not(#gl-x):not(#gl-y):not(#gl-z) {
	box-shadow: inset 0 0 0 1px #fff !important;
}
html body .glbe.glbe-dark:not(#gl-x):not(#gl-y):not(#gl-z):not(:disabled):not(.disabled):is(:hover, :focus-visible) {
	color: #fff !important;
	border-color: #fff !important;
}
html body .glbe.glbe-dark.glbe-nb:not(#gl-x):not(#gl-y):not(#gl-z):not(:disabled):not(.disabled):is(:hover, :focus-visible) {
	box-shadow: inset 0 0 0 1px #fff !important;
}
/* Botones sin borde en reposo: aro de 1px por dentro (no altera el tamano) */
html body .glbe.glbe-nb:not(#gl-x):not(#gl-y):not(#gl-z):not(:disabled):not(.disabled):is(:hover, :focus-visible) {
	box-shadow: inset 0 0 0 1px var(--glbe-wine) !important;
}
/* Textos, iconos y pseudo-elementos internos heredan el color del boton */
html body .glbe:not(#gl-x):not(#gl-y):not(#gl-z) :is(span, i, svg, .sc_button_text, .sc_button_title, .sc_button_icon, .elementor-button-text, .elementor-button-icon) {
	color: inherit !important;
	fill: currentColor !important;
	background: transparent !important;
}
html body a.sc_button.glbe:not(#gl-x):not(#gl-y):not(#gl-z)::before,
html body a.sc_button.glbe:not(#gl-x):not(#gl-y):not(#gl-z)::after {
	background-color: transparent !important;
	color: inherit !important;
}

/* ---- 3. Contenedores de widgets Elementor que pintan relleno/sombra detras del <a> ---- */
/* En reposo se respetan (p. ej. la sombra de "Read our story"); solo se vacian durante el hover,
   porque si no el texto vino quedaria sobre el relleno del contenedor. */
html body .elementor-widget-container:not(#gl-x):has(> .sc_button_wrap > a.sc_button:is(:hover, :focus-visible)),
html body .elementor-widget-container:not(#gl-x):has(> .elementor-button-wrapper > .elementor-button:is(:hover, :focus-visible)) {
	background-color: transparent !important;
	box-shadow: none !important;
}
html body .elementor-widget-container:not(#gl-x):has(> .sc_button_wrap > a.sc_button),
html body .elementor-widget-container:not(#gl-x):has(> .elementor-button-wrapper > .elementor-button) {
	transition: background-color .25s, box-shadow .25s !important;
}

/* ---- 4. Circulos de accion sobre la foto del producto (iconos, sin texto) ---- */
html body .post_featured .icons a:is(.shop_cart, .shop_link):not(#gl-x):not(#gl-y) { transition: all .25s !important; }
html body .post_featured .icons a:is(.shop_cart, .shop_link):not(#gl-x):not(#gl-y):is(:hover, :focus-visible) {
	background-color: #fff !important;
	border-color: var(--glbe-red) !important;
	color: var(--glbe-red) !important;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .22) !important;
}

@media (prefers-reduced-motion: reduce) {
	html body .glbe:not(#gl-x):not(#gl-y):not(#gl-z) { transition: none !important; }
}

/* ---- 5. Capa animada del tema junto a los submit de Contact Form 7 (relleno navy + icono en hover) ---- */
/* Quedaba detras del input vaciado y el texto vino no se leia sobre ella. */
html body .wpcf7-submit-style:not(#gl-x) > .submit-style-in {
	display: none !important;
}
