/* ELPE variation availability for Variation Swatches for WooCommerce. */
.variations_form .variable-item.elpe-color-unavailable,
.variations_form .variable-item.elpe-size-unavailable {
	cursor: not-allowed !important;
	pointer-events: auto !important;
}

.variations_form .variable-item.elpe-color-unavailable {
	position: relative;
	opacity: .58 !important;
	filter: saturate(.75);
}

.variations_form .variable-item.elpe-color-unavailable::before,
.variations_form .variable-item.elpe-color-unavailable::after {
	content: "";
	position: absolute;
	z-index: 20;
	top: 50%;
	left: 10%;
	width: 80%;
	height: 1px;
	background: rgba(220, 38, 38, .62);
	pointer-events: none;
	transform-origin: center;
}

.variations_form .variable-item.elpe-color-unavailable::before {
	transform: rotate(45deg);
}

.variations_form .variable-item.elpe-color-unavailable::after {
	transform: rotate(-45deg);
}

.variations_form .variable-item.elpe-size-unavailable {
	position: relative;
	overflow: hidden;
	color: #6b7280 !important;
	border-color: #d1d5db !important;
	background: #f8fafc !important;
	font-weight: 400 !important;
	text-decoration: none !important;
	opacity: .72 !important;
}

/* Use one consistent, subtle diagonal line for every unavailable size. */
.variations_form .variable-item.elpe-size-unavailable::before {
	content: "" !important;
	display: block !important;
	position: absolute !important;
	z-index: 20 !important;
	top: 50% !important;
	left: 8% !important;
	width: 84% !important;
	height: 1px !important;
	margin: 0 !important;
	background: rgba(220, 38, 38, .58) !important;
	border: 0 !important;
	transform: rotate(-45deg) !important;
	transform-origin: center !important;
	pointer-events: none !important;
}

.variations_form .variable-item.elpe-size-unavailable::after {
	content: none !important;
	display: none !important;
}

.variations_form .variable-item.elpe-size-unavailable,
.variations_form .variable-item.elpe-size-unavailable * {
	text-decoration: none !important;
}

/* Variation Swatches may render its own tooltip element. Never show it for disabled choices. */
.variable-item.elpe-color-unavailable .variable-item-tooltip,
.variable-item.elpe-size-unavailable .variable-item-tooltip,
.wvs-tooltip[data-elpe-disabled="true"] {
	display: none !important;
}

/* v3.35.0 — isolated two-button quote action row.
 * With quote items: exactly two equal columns. Without quote items the row is
 * removed by JS, leaving YITH's native add button at its original full width. */
.elpe-quote-action-anchor {
    display: none !important;
}

.variations_form .elpe-quote-action-row,
.product .elpe-quote-action-row,
.summary .elpe-quote-action-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: both !important;
    box-sizing: border-box !important;
}

.elpe-quote-action-row > .elpe-add-quote-slot,
.elpe-quote-action-row > .elpe-view-quote-persistent {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.elpe-quote-action-row > .elpe-add-quote-slot {
    display: block !important;
}

.elpe-quote-action-row > .elpe-add-quote-slot > *,
.elpe-quote-action-row > .elpe-add-quote-slot .add-request-quote-button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.elpe-quote-action-row > .elpe-view-quote-persistent {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 50px !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ff5a1f !important;
    color: #fff !important;
    font: inherit !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.elpe-quote-action-row > .elpe-view-quote-persistent:hover {
    color: #fff !important;
    text-decoration: none !important;
    filter: brightness(.96);
}

@media (max-width: 767px) {
    .variations_form .elpe-quote-action-row,
    .product .elpe-quote-action-row,
    .summary .elpe-quote-action-row {
        grid-template-columns: 1fr !important;
        row-gap: 10px !important;
    }
}

/* v3.36.0 — alignment-only hardening for the existing working quote action row.
 * Keep v3.35 behaviour untouched; only let the native YITH add-button fill its
 * already assigned 50% grid column, regardless of YITH wrapper depth. */
.elpe-quote-action-row > .elpe-add-quote-slot {
    display: flex !important;
    align-items: stretch !important;
}

.elpe-quote-action-row > .elpe-add-quote-slot > *,
.elpe-quote-action-row > .elpe-add-quote-slot > * > *,
.elpe-quote-action-row > .elpe-add-quote-slot .yith-ywraq-add-to-quote,
.elpe-quote-action-row > .elpe-add-quote-slot #yith-ywraq-add-to-quote,
.elpe-quote-action-row > .elpe-add-quote-slot .add-request-quote-button,
.elpe-quote-action-row > .elpe-add-quote-slot a.button,
.elpe-quote-action-row > .elpe-add-quote-slot button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}


/* v3.39.0 — keep the native clickable YITH add CTA itself stretched to the
 * complete ELPE grid slot after YITH rebuilds its markup through AJAX. */
.elpe-quote-action-row > .elpe-add-quote-slot > .add-request-quote-button,
.elpe-quote-action-row > .elpe-add-quote-slot > a[class*="add-request-quote"],
.elpe-quote-action-row > .elpe-add-quote-slot > button[class*="add-request-quote"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}


/* v3.40.0 — deterministic quote CTA geometry. The action row is now a direct
 * child of the variations form, never of YITH's shrink-to-content AJAX wrapper. */
form.variations_form > .elpe-quote-action-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

form.variations_form > .elpe-quote-action-row > .elpe-add-quote-slot,
form.variations_form > .elpe-quote-action-row > .elpe-view-quote-persistent {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: stretch !important;
}

form.variations_form > .elpe-quote-action-row > .elpe-add-quote-slot > .add-request-quote-button,
form.variations_form > .elpe-quote-action-row > .elpe-add-quote-slot > a[class*="add-request-quote"],
form.variations_form > .elpe-quote-action-row > .elpe-add-quote-slot > button[class*="add-request-quote"] {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 767px) {
    form.variations_form > .elpe-quote-action-row {
        grid-template-columns: 1fr !important;
    }
}


/* v3.41.0 — spacing-only adjustment. Keep v3.40 CTA geometry/behaviour intact;
 * add breathing room between the quantity field and the quote action row. */
form.variations_form > .elpe-quote-action-row {
    margin-top: 20px !important;
}
