/*
 * Pagina prodotto Gift Card Hybrid.
 *
 * Riveste il form di woo-gift-cards-lite con lo stile dei capi: etichette
 * maiuscole come "TAGLIA", riquadri come i bottoni taglia, campi squadrati,
 * bottone nero del tema. Tutto e' sotto body.hy-gift-card, quindi non tocca
 * nessun'altra pagina.
 */

.hy-gift-card {
	--hy-gc-ink: #0c0c0c;
	--hy-gc-muted: #6b6b6b;
	--hy-gc-line: #dcdcdc;
	--hy-gc-field: #ffffff;
	--hy-gc-error: #882e2e;
}

/* ---- Galleria: una sola immagine, a tutta colonna ---------------------- */

.hy-gift-card .c-product__slider--1 .c-product__slider-item {
	width: 100% !important;
	flex: 0 0 100% !important;
	max-width: 100% !important;
}
.hy-gift-card .c-product__slider--1 .c-product__slider-img {
	width: 100%;
	height: min(78vh, 760px);
	object-fit: cover;
	object-position: center;
}

/* ---- Prezzo ------------------------------------------------------------- */

.hy-gift-card .c-product__summary .price {
	margin: 18px 0 30px !important;
	font-size: 18px;
	font-weight: 500;
	color: var(--hy-gc-ink);
}
.hy-gift-card .c-product__summary .price ins {
	text-decoration: none;
}

/* ---- Form: ordine dei campi -------------------------------------------- */

.hy-gift-card .wps_wgm_added_wrapper {
	display: flex;
	flex-direction: column;
	gap: 28px;
	max-width: 460px;
	margin: 0 0 28px;
}
.hy-gift-card .wps_wgm_added_wrapper > .selected_price_type            { order: 1; }
.hy-gift-card .wps_wgm_added_wrapper > .wps_delivery_method            { order: 2; }
.hy-gift-card .wps_wgm_added_wrapper > .wps_wgm_new_layout_for_from_select { order: 3; }
.hy-gift-card .wps_wgm_added_wrapper > .wps_message                    { order: 4; }
.hy-gift-card .wps_wgm_added_wrapper > .mwg_wgm_preview_email          { order: 5; }

.hy-gift-card .wps_wgm_added_wrapper .wps_wgm_section {
	margin: 0;
	padding: 0;
}

/* ---- Etichette (come "TAGLIA") ----------------------------------------- */

.hy-gift-card .wps_wgm_added_wrapper .wps_wgm_section > label,
.hy-gift-card .wps_wgm_added_wrapper .wps_wgm_section .wps_wgc_label {
	display: block;
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hy-gc-ink);
}

/* ---- Campi -------------------------------------------------------------- */

.hy-gift-card .wps_wgm_added_wrapper input[type="text"],
.hy-gift-card .wps_wgm_added_wrapper textarea {
	display: block;
	width: 100% !important;
	min-height: 48px;
	margin: 0 !important;
	padding: 12px 14px;
	border: 1px solid var(--hy-gc-line);
	border-radius: 0;
	background: var(--hy-gc-field) !important;
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	color: var(--hy-gc-ink);
	transition: border-color .15s ease;
}
.hy-gift-card .wps_wgm_added_wrapper textarea {
	min-height: 110px;
	resize: vertical;
}
.hy-gift-card .wps_wgm_added_wrapper input[type="text"]::placeholder,
.hy-gift-card .wps_wgm_added_wrapper textarea::placeholder {
	color: #9a9a9a;
	opacity: 1;
}
.hy-gift-card .wps_wgm_added_wrapper input[type="text"]:focus,
.hy-gift-card .wps_wgm_added_wrapper textarea:focus {
	outline: none;
	border-color: var(--hy-gc-ink);
}
.hy-gift-card .wps_wgm_added_wrapper .wps_wgm_error {
	border-color: var(--hy-gc-error) !important;
}

.hy-gift-card .wps_wgm_message_length,
.hy-gift-card .wps_wgm_msg_info {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--hy-gc-muted);
}

/* ---- Importo: tagli rapidi + campo libero ------------------------------ */

/* Due righe da tre: 25 50 100 / 150 250 ALTRO IMPORTO. */
.hy-gift-card .hy-gc-presets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	max-width: 460px;
}
.hy-gift-card .hy-gc-preset {
	min-width: 0;
	height: 42px;
	padding: 0 6px;
	white-space: nowrap;
	border: 1px solid var(--hy-gc-line);
	border-radius: 0;
	background: var(--hy-gc-field);
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .04em;
	color: var(--hy-gc-ink);
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.hy-gift-card .hy-gc-preset--other {
	font-size: 11px;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: normal; /* su schermi stretti va su due righe invece di uscire */
}
.hy-gift-card .hy-gc-preset:hover {
	border-color: var(--hy-gc-ink);
}
.hy-gift-card .hy-gc-preset.is-active {
	border-color: var(--hy-gc-ink);
	box-shadow: inset 0 0 0 1px var(--hy-gc-ink);
}
.hy-gift-card .hy-gc-preset:focus-visible {
	outline: 2px solid var(--hy-gc-ink);
	outline-offset: 2px;
}

/* Campo per la cifra libera: si apre con il bottone "Altro importo". */
.hy-gift-card .hy-gc-other {
	display: none;
	margin-top: 12px;
}
.hy-gift-card .hy-gc-other.is-open {
	display: block;
}
.hy-gift-card .hy-gc-other__input {
	position: relative;
	display: block;
	max-width: 200px;
}
.hy-gift-card .wps_wgm_added_wrapper .hy-gc-other__input input#wps_wgm_price {
	min-height: 42px;
	padding-right: 32px;
	font-weight: 500;
}
.hy-gift-card .hy-gc-other__currency {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	font-size: 14px;
	color: var(--hy-gc-muted);
	pointer-events: none;
}

/* ---- Destinatario: un solo metodo, niente radio e niente riquadro ------ */

.hy-gift-card .wps_wgm_delivery_method {
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
}
/* Il tema disegna i radio con display/appearance propri: serve !important. */
.hy-gift-card .wps_wgm_delivery_method > input.wps_wgm_send_giftcard,
.hy-gift-card .wps_wgm_delivery_method > .wps_wgm_method {
	display: none !important;
}

/* ---- Anteprima email: link secondario ---------------------------------- */

.hy-gift-card .mwg_wgm_preview_email {
	display: block;
}
.hy-gift-card a#mwg_wgm_preview_email {
	display: inline-block;
	width: auto;
	padding: 0 0 2px;
	border-bottom: 1px solid currentColor;
	background: none;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--hy-gc-ink);
	text-decoration: none;
}
.hy-gift-card a#mwg_wgm_preview_email:hover {
	color: var(--hy-gc-muted);
}

/* ---- Finestra di anteprima (ThickBox) ---------------------------------- */

.hy-gift-card #TB_window {
	border: 0;
	border-radius: 0;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	background: #f2f1ef;
}
.hy-gift-card #TB_title {
	height: 44px;
	border: 0;
	background: #f2f1ef;
}
.hy-gift-card #TB_closeWindowButton {
	width: 44px;
	height: 44px;
	border: 0;
	outline: none;
	box-shadow: none;
}
.hy-gift-card #TB_closeWindowButton .tb-close-icon {
	color: var(--hy-gc-ink);
}
.hy-gift-card #TB_closeWindowButton:focus-visible .tb-close-icon {
	outline: 2px solid var(--hy-gc-ink);
}

/* ---- Errori del form --------------------------------------------------- */

.hy-gift-card .hy-gc-field-error {
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--hy-gc-error);
}

/* Box degli errori del plugin: resta solo per messaggi non riconosciuti
   (di norma gli errori vanno sotto ai campi, vedi gift-card.js). */
.hy-gift-card #wps_wgm_error_notice {
	margin: 0 0 24px;
	padding: 14px 18px;
	border: 1px solid var(--hy-gc-error);
	border-left-width: 3px;
	background: #fff;
	color: var(--hy-gc-error);
	font-size: 13px;
	list-style: none;
}
.hy-gift-card #wps_wgm_error_notice ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.hy-gift-card #wps_wgm_error_notice::before {
	display: none;
}

/* ---- Quantita': una gift card per riga, il campo non serve ------------- */

.hy-gift-card form.cart .quantity {
	display: none !important;
}
.hy-gift-card form.cart .single_add_to_cart_button {
	width: 100%;
	max-width: 460px;
	margin-left: 0 !important;
}

/* ---- Mobile ------------------------------------------------------------ */

@media (max-width: 767px) {
	.hy-gift-card .c-product__slider--1 .c-product__slider-img {
		height: auto;
		aspect-ratio: 1 / 1;
	}
	.hy-gift-card .wps_wgm_added_wrapper,
	.hy-gift-card form.cart .single_add_to_cart_button {
		max-width: none;
	}
	.hy-gift-card .hy-gc-presets {
		gap: 6px;
	}
	.hy-gift-card .hy-gc-preset {
		font-size: 12px;
	}
}
