/* AHG Engraving: product page panel. Palette (31/10/2026): olive for actions, antique gold for accents, walnut text, stone and cream backgrounds. */
.ahg-engrave{
	--ahg-black:var(--global-palette1,#556B2F);
	--ahg-black-hover:var(--global-palette11,#44561F);
	--ahg-gold:var(--global-palette2,#7D600C);
	--ahg-text:var(--global-palette4,#1F1B16);
	--ahg-muted:var(--global-palette5,#6B6258);
	--ahg-border:var(--global-palette6,#DDD5C6);
	--ahg-field:var(--global-palette12,#8E8678);
	--ahg-soft:var(--global-palette7,#EEE7D9);
	--ahg-white:var(--global-palette9,#FFFFFF);
	--ahg-metal:var(--global-palette10,#D4AF37);
	margin:0 0 22px;
	padding:18px 18px 8px;
	width:100%;
	max-width:100%;
	min-width:0; /* flex item inside form.cart: never grow to the font chips' min-content width */
	box-sizing:border-box;
	border:1px solid var(--ahg-border);
	border-radius:12px;
	background:var(--ahg-white);
	text-align:right;
	font-family:var(--global-body-font-family,'Heebo',sans-serif);
	color:var(--ahg-text);
}
.ahg-engrave__hidden{display:none!important}
.ahg-engrave__head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:12px}
.ahg-engrave__title{font-family:var(--global-heading-font-family,'Frank Ruhl Libre',serif);font-weight:700;font-size:20px;line-height:1.2;color:var(--ahg-text)}
.ahg-engrave__title::before{content:"";display:inline-block;width:22px;height:2px;background:var(--ahg-gold);vertical-align:middle;margin-left:10px}
.ahg-engrave__hint{font-size:13px;color:var(--ahg-muted)}

/* add-on cards: text and picture are independent, each one toggles on/off and adds its own price */
.ahg-engrave__lead{margin:-4px 0 12px;font-size:13.5px;line-height:1.5;color:var(--ahg-muted)}
.ahg-engrave__choice{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:10px;margin:0 0 14px}
.ahg-engrave__opt{position:relative;margin:0;cursor:pointer;display:flex;align-items:center;gap:10px;padding:12px 14px;min-height:60px;border:1px solid var(--ahg-border);border-radius:12px;background:var(--ahg-white);transition:border-color .15s,background .15s,box-shadow .15s;-webkit-tap-highlight-color:transparent}
.ahg-engrave__opt input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.ahg-engrave__check{flex:0 0 22px;width:22px;height:22px;box-sizing:border-box;border:1.5px solid var(--ahg-field);border-radius:6px;background:var(--ahg-white);display:inline-flex;align-items:center;justify-content:center;transition:background .15s,border-color .15s}
.ahg-engrave__check::after{content:"";width:5px;height:10px;margin-top:-2px;border:solid var(--ahg-white);border-width:0 2px 2px 0;transform:rotate(45deg);opacity:0;transition:opacity .12s}
.ahg-engrave__opt-body{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.2}
.ahg-engrave__opt b{font-weight:600;font-size:15px;color:var(--ahg-text)}
.ahg-engrave__opt em{align-self:flex-start;font-style:normal;font-size:13px;color:var(--ahg-muted);white-space:nowrap;direction:ltr;unicode-bidi:isolate}
.ahg-engrave__opt em.ahg-engrave__incl{direction:rtl}
.ahg-engrave__opt:hover{border-color:var(--ahg-gold)}
.ahg-engrave__opt.is-active{border-color:var(--ahg-black);box-shadow:inset 0 0 0 1px var(--ahg-black);background:var(--ahg-soft)}
.ahg-engrave__opt.is-active .ahg-engrave__check{background:var(--ahg-black);border-color:var(--ahg-black)}
.ahg-engrave__opt.is-active .ahg-engrave__check::after{opacity:1}
.ahg-engrave__opt.is-active em{color:var(--ahg-gold);font-weight:600}
.ahg-engrave__opt input:focus-visible ~ .ahg-engrave__check{outline:2px solid var(--ahg-gold);outline-offset:2px}
/* when both add-ons are open, a hairline separates the text block from the picture block */
#ahg-panel-text:not([hidden]) + #ahg-panel-image:not([hidden]){border-top:1px solid var(--ahg-border);padding-top:14px;margin-top:2px}

/* fields */
.ahg-engrave__panel{padding:2px 0 12px;min-width:0;max-width:100%}
.ahg-engrave__row{display:flex;align-items:baseline;justify-content:space-between;margin:12px 0 5px}
.ahg-engrave__row:first-child{margin-top:0}
.ahg-engrave__row label,.ahg-engrave__fields > label,.ahg-engrave__label{display:block;font-size:14px;font-weight:500;margin:0;color:var(--ahg-text)}
.ahg-engrave__fields > label,.ahg-engrave__label{margin:14px 0 6px}
.ahg-engrave__muted{font-weight:400;color:var(--ahg-muted)}
.ahg-engrave input[type="text"],.ahg-engrave textarea{
	width:100%;box-sizing:border-box;border:1px solid var(--ahg-border);border-radius:10px;background:var(--ahg-white);color:var(--ahg-text);
	padding:11px 12px;font-size:17px;line-height:1.4;font-family:inherit;box-shadow:none;transition:border-color .15s
}
.ahg-engrave input[type="text"]:focus,.ahg-engrave textarea:focus{outline:none;border-color:var(--ahg-gold);box-shadow:0 0 0 2px rgba(125,96,12,.15)}
.ahg-engrave textarea{resize:vertical;min-height:64px;font-size:15px}
/* 2.7.0: the text to engrave is one field that grows with the text (engrave.js sets its height). No character counter. */
.ahg-engrave textarea.ahg-engrave__text{display:block;resize:none;overflow:hidden;min-height:48px;font-size:17px;line-height:1.4}

/* 2.7.0 font chips, each drawn in its own font: the customer's text (or the sample) on top, the name of the font under it.
   Two in a row on a phone, with no sideways scrolling. A long text shows its beginning and three dots. */
.ahg-engrave__fonts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;min-width:0;max-width:100%}
.ahg-engrave__font{position:relative;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;min-width:0;min-height:56px;margin:0;padding:8px 10px 6px;cursor:pointer;border:1px solid var(--ahg-border);border-radius:10px;background:var(--ahg-white);text-align:center;transition:border-color .15s,background .15s,box-shadow .15s;-webkit-tap-highlight-color:transparent}
.ahg-engrave__font input{position:absolute;opacity:0;width:0;height:0;margin:0}
.ahg-engrave__font-sample{display:block;max-width:100%;overflow:hidden;overflow-x:clip;overflow-y:visible;text-overflow:ellipsis;white-space:nowrap;font-size:20px;line-height:1.25;color:var(--ahg-text);font-weight:inherit}
.ahg-engrave__font-name{display:block;font-family:var(--global-body-font-family,'Heebo',sans-serif);font-size:12px;line-height:1.3;color:var(--ahg-muted);margin-top:3px;font-weight:400}
.ahg-engrave__font:hover{border-color:var(--ahg-gold)}
/* the chosen font: a thick frame and a filled background, not colour alone */
.ahg-engrave__font.is-active{border-color:var(--ahg-black);box-shadow:inset 0 0 0 2px var(--ahg-black);background:var(--ahg-soft)}
.ahg-engrave__font:has(input:focus-visible){outline:2px solid var(--ahg-gold);outline-offset:2px}
@supports not selector(:has(a)){.ahg-engrave__font input:focus-visible ~ .ahg-engrave__font-sample{outline:2px solid var(--ahg-gold);outline-offset:3px;border-radius:2px}}
.ahg-engrave__font[hidden]{display:none}
@media (min-width:768px){.ahg-engrave__fonts{grid-template-columns:repeat(auto-fill,minmax(128px,1fr))}}

/* font styles: tabs above the chips, wrapping to more rows on a narrow screen. A chip outside the open style is not on screen, so its file is not downloaded */
.ahg-engrave__font-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px;padding:0}
.ahg-engrave__font-tab{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;margin:0;padding:6px 16px;border:1px solid var(--ahg-border);border-radius:50px;background:var(--ahg-white);box-shadow:none;font:inherit;font-size:14px;line-height:1.2;color:var(--ahg-text);cursor:pointer;transition:border-color .15s,background .15s,color .15s}
.ahg-engrave__font-tab:hover,.ahg-engrave__font-tab:focus{border-color:var(--ahg-gold);background:var(--ahg-white);color:var(--ahg-text);box-shadow:none}
.ahg-engrave__font-tab.is-active,.ahg-engrave__font-tab.is-active:hover,.ahg-engrave__font-tab.is-active:focus{border-color:var(--ahg-black);background:var(--ahg-black);color:var(--ahg-white)}
.ahg-engrave__font-tab:focus-visible{outline:2px solid var(--ahg-gold);outline-offset:2px}
.ahg-engrave__note{margin:12px 0 0;font-size:13px;line-height:1.5;color:var(--ahg-muted)}
/* while a file is still uploading, the add-to-cart entry points wait */
body.ahg-uploading .single_add_to_cart_button,body.ahg-uploading .ahg-sticky-atc__btn,body.ahg-uploading .ahg-direct-checkout-btn{opacity:.45;pointer-events:none}
.ahg-engrave__note-mobile{display:none}
@media (max-width:767px){.ahg-engrave__note-desktop{display:none}.ahg-engrave__note-mobile{display:inline}}

/* upload */
.ahg-engrave__upload{display:flex;align-items:center;gap:14px;padding:12px;border:1px dashed var(--ahg-gold);border-radius:12px;background:var(--ahg-soft);transition:background .15s,border-color .15s}
.ahg-engrave__upload.is-drag{background:var(--ahg-border);border-style:solid}
.ahg-engrave__upload input[type="file"]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.ahg-engrave__thumb{width:64px;height:64px;object-fit:contain;background:var(--ahg-white);border:1px solid var(--ahg-border);border-radius:8px;flex:none}
.ahg-engrave__upload-text{display:flex;flex-direction:column;gap:6px;align-items:flex-start;min-width:0}
.ahg-engrave__btn{display:inline-block;margin:0!important;padding:9px 18px;border:1px solid var(--ahg-black);border-radius:50px;background:var(--ahg-black);color:var(--ahg-white)!important;font-size:14px!important;font-weight:500!important;cursor:pointer;line-height:1.2;transition:background .15s,color .15s}
.ahg-engrave__btn:hover{background:var(--ahg-black-hover);border-color:var(--ahg-black-hover);color:var(--ahg-white)!important}
.ahg-engrave__upload input[type="file"]:focus-visible ~ .ahg-engrave__upload-text .ahg-engrave__btn{outline:2px solid var(--ahg-gold);outline-offset:2px}
.ahg-engrave__filename{font-size:13px;color:var(--ahg-muted);word-break:break-all}
.ahg-engrave__filename.is-done{color:var(--ahg-text);font-weight:500}
.ahg-engrave__filename.is-done::before{content:"\2713";color:var(--ahg-gold);margin-left:6px;font-weight:700}
.ahg-engrave__filename.is-busy{color:var(--ahg-gold)}

/* notes toggle */
.ahg-engrave__toggle{background:none;border:0;padding:0;margin:2px 0 0;font:inherit;font-size:14px;color:var(--ahg-gold);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.ahg-engrave__toggle span{display:inline-block;width:18px;height:18px;border:1px solid var(--ahg-gold);border-radius:50%;line-height:16px;text-align:center;font-size:14px}
.ahg-engrave__toggle.is-open span{transform:rotate(45deg)}
.ahg-engrave__toggle:hover{color:var(--ahg-text)}
#ahg_notes_wrap{margin-top:10px}

.ahg-engrave__error{margin:8px 0 0;padding:8px 12px;border-radius:10px;background:rgba(161,46,53,.08);color:var(--global-palette13,#A12E35);font-size:14px}

/* the engraving drawn over the main product image */
.ahg-overlay{position:absolute;left:0;top:0;pointer-events:none;z-index:3;display:none}
body.ahg-engraving-live .ahg-overlay{display:block}
/* the transparent layer the customer drags on; it sits above the picture and below nothing */
.ahg-overlay__handle{position:absolute;left:0;top:0;z-index:4;display:none;cursor:move;touch-action:none;outline:none;-webkit-tap-highlight-color:transparent}
body.ahg-engraving-live .ahg-overlay__handle{display:block}
.ahg-overlay__handle:focus-visible{box-shadow:inset 0 0 0 2px var(--ahg-gold)}
body.ahg-engraving-live .kadence-product-gallery-main .splide__track{cursor:default}

/* 2.7.0 size of the letters, in words: three buttons. The customer never sees millimetres */
.ahg-engrave__sizes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ahg-engrave__size-opt{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;margin:0;padding:6px 10px;border:1px solid var(--ahg-border);border-radius:10px;background:var(--ahg-white);font-size:15px;font-weight:500;line-height:1.2;color:var(--ahg-text);text-align:center;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s;-webkit-tap-highlight-color:transparent}
.ahg-engrave__size-opt input{position:absolute;opacity:0;width:0;height:0;margin:0}
.ahg-engrave__size-opt:hover{border-color:var(--ahg-gold)}
.ahg-engrave__size-opt.is-active{border-color:var(--ahg-black);box-shadow:inset 0 0 0 2px var(--ahg-black);background:var(--ahg-soft);font-weight:600}
.ahg-engrave__size-opt:has(input:focus-visible){outline:2px solid var(--ahg-gold);outline-offset:2px}
@supports not selector(:has(a)){.ahg-engrave__size-opt input:focus-visible ~ span{outline:2px solid var(--ahg-gold);outline-offset:3px;border-radius:2px}}
.ahg-engrave__center{flex:none;background:none;border:1px solid var(--ahg-border);border-radius:50px;padding:6px 14px;font:inherit;font-size:13px;color:var(--ahg-text);cursor:pointer;line-height:1.2;transition:border-color .15s,background .15s}
.ahg-engrave__center:hover{border-color:var(--ahg-black);background:var(--ahg-soft)}
.ahg-engrave__tip{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:var(--ahg-soft);font-size:13px;line-height:1.5;color:var(--ahg-text)}
body.ahg-engraving-live .kadence-product-gallery-main .zoomImg,body.ahg-engraving-live .woocommerce-product-gallery .zoomImg{display:none!important}

/* 2.7.0: the preview inside the form, right under the text field (phones and tablets). It is part of the page: it never sticks,
   moves or hides. On a wide screen the preview is on the product picture, and only the caption stays here. */
.ahg-engrave__preview{margin:6px 0 0}
.ahg-engrave__preview-stage{display:none}
.ahg-engrave .ahg-engrave__preview-cap{margin:0;font-size:13px;line-height:1.35;color:var(--ahg-muted)}
@media (max-width:1024px){
	.ahg-engrave__preview{margin-top:10px;padding:8px 8px 7px;border:1px solid var(--ahg-border);border-radius:12px;background:var(--ahg-white);text-align:center}
	.ahg-engrave__preview-stage{display:flex;align-items:center;justify-content:center;height:84px}
	.ahg-engrave__preview-canvas{display:block;border-radius:8px}
	.ahg-engrave .ahg-engrave__preview-cap{margin-top:6px}
}
/* before the button: nothing is engraved without the customer's approval of the final file */
.ahg-engrave__approve{display:none;align-items:flex-start;gap:10px;margin:6px 0 12px;padding:11px 12px;border:1px solid var(--ahg-gold);border-radius:10px;background:var(--ahg-white)}
.ahg-engrave.is-open .ahg-engrave__approve{display:flex}
.ahg-engrave__approve svg{flex:0 0 20px;width:20px;height:20px;margin-top:1px;fill:none;stroke:var(--ahg-gold);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ahg-engrave__approve p{margin:0;font-size:13.5px;line-height:1.5;color:var(--ahg-text)}
.ahg-engrave__approve b{font-weight:600}
.ahg-engrave__approve-preview{display:none}
body.ahg-engraving-text .ahg-engrave__approve-preview{display:inline}
/* when it is ready: always on screen, also before an engraving is chosen. Each sentence wraps as a whole, so a range of days is never split */
.ahg-engrave__delivery-part{display:inline-block}
.ahg-engrave__delivery{display:flex;align-items:flex-start;gap:8px;margin:2px 0 12px;font-size:13.5px;line-height:1.5;color:var(--ahg-text)}
.ahg-engrave__delivery svg{flex:0 0 18px;width:18px;height:18px;margin-top:1px;fill:none;stroke:var(--ahg-gold);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

@media (max-width:767px){
	.ahg-engrave{padding:14px 14px 6px}
	.ahg-engrave__opt{padding:11px 12px;gap:9px;min-height:56px}
	.ahg-engrave__opt b{font-size:14.5px}
	.ahg-engrave__title{font-size:18px}
	.ahg-engrave__font{padding:7px 8px 5px}
	.ahg-engrave__font-sample{font-size:19px}
}

/* Cart / checkout rows for engraving data */
.wc-block-components-product-details__חריטת-טקסט,.wc-block-components-product-details__גופן,.wc-block-components-product-details__גודל-האותיות,.wc-block-components-product-details__חריטת-תמונה,.wc-block-components-product-details__הערה-לחריטה{font-size:13px}

/* 2.6.0 / 2.7.0: the help line, links inside notes, and the free "I'll send a picture of the text" checkbox */
.ahg-engrave .ahg-engrave__help{font-size:13.5px;color:var(--ahg-text)}
.ahg-engrave .ahg-engrave__help a{display:inline-block;padding:12px 0;margin:-12px 0}
.ahg-engrave .ahg-engrave__note a,.ahg-engrave .ahg-engrave__tip a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px}
.ahg-engrave .ahg-engrave__ref{position:relative;display:flex;align-items:flex-start;gap:10px;box-sizing:border-box;min-height:44px;margin:12px 0 0;padding:12px;border-radius:10px;background:var(--ahg-soft);font-size:13.5px;font-weight:400;line-height:1.45;color:var(--ahg-text);cursor:pointer;-webkit-tap-highlight-color:transparent}
.ahg-engrave .ahg-engrave__ref input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.ahg-engrave .ahg-engrave__ref .ahg-engrave__check{flex:0 0 20px;width:20px;height:20px;margin-top:1px}
.ahg-engrave .ahg-engrave__ref input:checked ~ .ahg-engrave__check{background:var(--ahg-black);border-color:var(--ahg-black)}
.ahg-engrave .ahg-engrave__ref input:checked ~ .ahg-engrave__check::after{opacity:1}
.ahg-engrave .ahg-engrave__ref input:focus-visible ~ .ahg-engrave__check{outline:2px solid var(--ahg-gold);outline-offset:2px}
