/*!
 * T5: G&P rebuild client styles (design §2.3, §9 T5).
 * Loaded on every public page (T2 links it) and on /enroll/*.
 * Vendor CSS (Astra, Woo, Elementor, Age Gate main.css) still does the
 * heavy lifting; this file only adds what the removed plugin JS used to
 * toggle, plus the enroll-only pieces. The SX signing layout lives in
 * gp-sx.css (contract page only).
 */

/* ---------------------------------------------------- signature fonts (OFL) */
@font-face { font-family: 'GP La Belle Aurore'; src: url(/assets/gp/fonts/la-belle-aurore.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'GP Shadows Into Light'; src: url(/assets/gp/fonts/shadows-into-light.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'GP Nothing You Could Do'; src: url(/assets/gp/fonts/nothing-you-could-do.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'GP Zeyada'; src: url(/assets/gp/fonts/zeyada.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'GP Dawning of a New Day'; src: url(/assets/gp/fonts/dawning-of-a-new-day.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'GP Herr Von Muellerhoff'; src: url(/assets/gp/fonts/herr-von-muellerhoff.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'GP Over the Rainbow'; src: url(/assets/gp/fonts/over-the-rainbow.woff2) format('woff2'); font-display: swap; }

/* ------------------------------------------------------ header mini-cart panel */
/* Elementor Pro's widget CSS animates the side cart off its own JS-set
   class; gp-minicart.js sets the same class, these rules make sure the panel
   shows even where that CSS keys off something else. */
.elementor-menu-cart--shown .elementor-menu-cart__container {
	transform: scale(1);
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
.elementor-menu-cart--shown .elementor-menu-cart__main {
	transform: none;
	opacity: 1;
	visibility: visible;
}
.elementor-menu-cart__footer-buttons .elementor-button { cursor: pointer; }

/* Woo loop/add-to-cart states the stripped Woo JS used to drive */
.woocommerce a.button.loading,
.woocommerce button.button.loading { opacity: .6; pointer-events: none; }
.woocommerce a.added_to_cart { display: inline-block; padding-top: .5em; }

/* ----------------------------------------------------------------- age gate */
/* Fallback only; Age Gate's own main.css (kept by T2) styles the overlay. */
body.age-restriction { overflow: hidden; }
[data-gp-agegate-overlay] {
	position: fixed; inset: 0; z-index: 10000;
	display: flex; align-items: center; justify-content: center;
	padding: 20px; box-sizing: border-box; text-align: center;
}
[data-gp-agegate-overlay] .age-gate-background-color { position: fixed; inset: 0; background: #fff; z-index: 1; }
[data-gp-agegate-overlay] .age-gate { position: relative; z-index: 3; max-width: 500px; width: 100%; background: #fff; color: #000; }
[data-gp-agegate-overlay] .age-gate-error { color: #c00; font-weight: bold; }

/* --------------------------------------------------------------- contact form */
.gp-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------- enroll */
.gp-enroll .elementor-invisible { visibility: visible; }
.gp-enroll .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown,
.gp-enroll .elementor-nav-menu--dropdown.gp-nav-open {
	transform: scaleY(1);
	max-height: 100vh;
	visibility: visible;
}
.woocommerce a.checkout-button.disabled,
.woocommerce a.checkout-button[aria-disabled="true"] {
	opacity: .5;
	cursor: not-allowed;
	pointer-events: none;
}
.gp-proceed-notice .woocommerce-info { margin-bottom: 1em; }
.gp-balance-row th, .gp-balance-row td { font-weight: normal; }
.woocommerce form.checkout.processing #place_order { opacity: .6; pointer-events: none; }
.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select { border-color: #a00; }
.woocommerce-checkout .form-row select {
	width: 100%;
	min-height: 2.5em;
}
.woocommerce ul.woocommerce-error:focus { outline: 2px solid #a00; outline-offset: 2px; }

/* ------------------------------------------------------- contract (SX) extras */
[data-gp-contract] [hidden],
#gp-signature-modal[hidden],
#gp-sx-errors[hidden],
#gp-agree-error[hidden] { display: none !important; }

.gp-sx-input,
[data-gp-contract] input[data-gp-field] {
	width: 150px;
	max-width: 100%;
	padding: 4px 6px;
	border: 1px solid #b3b3b3;
	border-radius: 3px;
	font: inherit;
	box-sizing: border-box;
	background: #fff;
}
.gp-sx-input-initials, [data-gp-contract] input[data-gp-field="initials"] { width: 100px; }
.gp-sx-input-address, .gp-sx-input-minor_names,
[data-gp-contract] input[data-gp-field="address"],
[data-gp-contract] input[data-gp-field="minor_names"] { width: 260px; }
[data-gp-contract] input:focus-visible,
[data-gp-contract] select:focus-visible,
[data-gp-contract] [role="button"]:focus-visible,
[data-gp-contract] button:focus-visible,
#gp-signature-modal a:focus-visible,
#gp-signature-modal input:focus-visible {
	outline: 2px solid #786fff;
	outline-offset: 2px;
}
[data-gp-contract] .gp-invalid { border-color: #c00 !important; box-shadow: 0 0 0 1px #c00; }

#gp-sx-errors { max-width: 900px; margin: 16px auto 0; padding: 0 16px; box-sizing: border-box; }
#gp-sx-errors .woocommerce-error {
	list-style: none; margin: 0; padding: 12px 16px;
	background: #fff4f4; border-left: 4px solid #c00; color: #5b0000;
}
#gp-agree-error { color: #c00; font-weight: 600; margin: 0; text-align: center; }

/* "Sign here" box (replaces the plugin's branded sign-here artwork) */
#gp-esign__add-signature {
	display: flex; align-items: center; justify-content: center;
	width: 300px; max-width: 100%; min-height: 90px; margin-top: 12px;
	border: 2px dashed #786fff; border-radius: 6px; background: #fff;
	color: #786fff; font-weight: 600; cursor: pointer; box-sizing: border-box;
}
#gp-esign__add-signature.gp-signed { border-style: solid; color: #0a1c2e; }
.gp-sig-preview { max-width: 100%; max-height: 90px; }
.gp-sig-typed-preview { font-size: 34px; line-height: 1.2; padding: 4px 10px; }

/* signature modal (SX popup classes from gp-sx.css + these) */
#gp-signature-modal .gp-esign__signature-draw:not([hidden]),
#gp-signature-modal .gp-esign__signature-type:not([hidden]) { display: block; width: 100%; }
#gp-signature-modal .gp-esign__signature-header-links a { text-decoration: none; padding: 4px 2px; }
.gp-sig-canvas {
	display: block; width: 100%; height: 180px;
	border: 1px solid #c4c4c4; border-radius: 6px; background: #fff;
	touch-action: none; cursor: crosshair;
}
.gp-sig-canvas-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 14px; }
.gp-sig-canvas-row a { color: #786fff; }
.gp-font-list { border: 0; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.gp-font-list legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.gp-font-list label {
	display: flex; align-items: center; gap: 8px;
	border: 1px solid #e5e5e5; border-radius: 6px; padding: 6px 10px; cursor: pointer;
}
.gp-font-list label:has(input:checked) { border-color: #786fff; background: #E8E7FF; }
.gp-font-list [data-gp-font-preview] { font-size: 26px; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gp-sig-error { color: #c00; min-height: 1.2em; margin: 0; font-size: 14px; }
.gp-sig-actions { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }
.gp-sig-cancel { background: none; border: 0; color: #2f3d4b; text-decoration: underline; cursor: pointer; font-size: 16px; }

/* de-branded brand mark in the SX header (text instead of the plugin logo) */
.gp-sx-brand { font-weight: 700; color: #2f3d4b; font-size: 15px; text-align: right; }
.SX-terms-modal { display: none; }
.SX-terms-modal.is-active { display: flex; }
.SX-terms-modal .gp-terms-body p { margin: 0 0 12px; line-height: 1.5; }

@media (max-width: 544px) {
	.gp-sx-input, [data-gp-contract] input[data-gp-field] { width: 100%; }
	[data-gp-contract] table, [data-gp-contract] tbody, [data-gp-contract] tr, [data-gp-contract] td { display: block; width: 100% !important; }
}

@media print {
	.SX-overlay-modal-container, #gp-signature-modal, .SX-header-small, #SX-agree-sign { display: none !important; }
}
