/* JDEV: warianty jako przyciski na karcie produktu (HOHO), telefon i komputer.
   Markup: mu-plugins/jdev-warianty-przyciski.php, logika: warianty-przyciski.js.
   Wyglad jak przyciski opcji w plywaku (sticky-add-to-cart): zielen HOHO #165b33, font nexa. */

/* lista WooCommerce zostaje w formularzu dla jego skryptu, ale jej nie widac */
.variations select[data-hoho-przyciski] {
	position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
	overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important;
}
.variations td.value { position: relative; }

.hoho-warianty { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.hoho-warianty .hoho-wariant {
	flex: 1 1 140px; max-width: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	min-height: 52px; height: auto; margin: 0; padding: 6px 12px;
	border: 1.5px solid #cfdcd3; border-radius: 14px; background: #fff; color: #1d1d1b;
	font-family: nexa, sans-serif; font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: normal; text-transform: none;
	box-shadow: none; cursor: pointer; transition: border-color .15s, background .15s;
}
.hoho-warianty .hoho-wariant:hover:not(:disabled) { border-color: #1d7d45; }
.hoho-warianty .hoho-wariant:focus-visible { outline: 2px solid #1d7d45; outline-offset: 2px; }
.hoho-warianty .hoho-wariant[aria-pressed="true"] { border-color: #165b33; background: #eaf4ee; color: #165b33; }
.hoho-warianty .hoho-wariant:disabled { opacity: .45; cursor: default; }
.hoho-wariant__cena { font-size: 13px; font-weight: 400; color: #5b6b61; }
.hoho-wariant__cena:empty { display: none; }

/* tabela wariantow: etykieta nad przyciskami, przyciski na cala szerokosc */
form.hoho-ma-przyciski table.variations, form.hoho-ma-przyciski table.variations tbody,
form.hoho-ma-przyciski table.variations tr, form.hoho-ma-przyciski table.variations th,
form.hoho-ma-przyciski table.variations td { display: block; width: 100%; padding-left: 0; padding-right: 0; }
form.hoho-ma-przyciski table.variations th.label { padding-bottom: 4px; }
form.hoho-ma-przyciski .reset_variations { display: inline-block; margin-top: 2px; font-size: 13px; }

@media (max-width: 639px) {
	.hoho-warianty .hoho-wariant { flex-basis: calc(50% - 4px); max-width: none; min-height: 48px; font-size: 14px; }
}

/* niewybrana cecha po kliknieciu "Wybierz ..." w plywaku: przyciski mrugaja zielona obwodka */
.variations select.jdev-atc-need + .hoho-warianty .hoho-wariant { animation: hoho-wariant-need 1.6s ease; }
@keyframes hoho-wariant-need {
	0%, 60% { border-color: #1d7d45; box-shadow: 0 0 0 3px rgba(29, 125, 69, .35); }
	100% { box-shadow: 0 0 0 0 rgba(29, 125, 69, 0); }
}
