/* Product Fields Plus – product page (original Advanced Product Fields rules first, so existing fields look the same) */
.woocommerce-variation-add-to-cart,form.cart{flex-wrap:wrap!important}
.wapf{width:100%}
.wapf-hide{display:none!important}
.wapf-wrapper{width:100%}
[data-wapf-variation-rules]{display:none}
[data-wapf-variation-rules].wapf-show{display:block}
.wapf-field-row{display:flex;flex-wrap:wrap;margin-left:-5px}
.wapf-field-row .wapf-field-container:last-child{padding-right:0}
.wapf-field-container{padding:0 5px 15px 5px;box-sizing:border-box}
.wapf-field-description{font-size:85%;opacity:.8;padding:0;margin:0;padding-top:5px}
.wapf-field-container label[for]{cursor:pointer}
.wapf-field-input input[type=email],.wapf-field-input input[type=number],.wapf-field-input input[type=text],.wapf-field-input input[type=url],.wapf-field-input select,.wapf-field-input textarea{width:100%;box-sizing:border-box}
.wapf-input-label{font-weight:400}
.wapf-pricing-hint{opacity:.7}
.wapf-product-totals{display:none;width:100%}
.wapf-product-totals .wapf--inner{padding:20px 0}
.wapf-product-totals .wapf--inner>div{padding-bottom:10px;clear:both}
.wapf-product-totals .wapf--inner>div:last-child{padding-bottom:0}
.wapf-product-totals div span:first-child{font-weight:700}
.wapf-product-totals div span:last-child{float:right}

/*
 * Checkboxes, radio buttons and the single True/False checkbox: one clean design.
 * Size, padding, border and background are locked (!important) because the site-wide
 * form field styles (theme / Elementor Site Settings) give every input text-box padding,
 * width and borders, which would stretch a checkbox into a wide rectangle.
 */
.wapf-checkboxes,.wapf-radios{display:flex;flex-direction:column;gap:10px}
.wapf-field-input .wapf-checkable{margin:0}
.wapf-field-input .wapf-checkable:not(.pfp-swatch)>label{display:inline-flex!important;align-items:flex-start;gap:10px;width:auto!important;margin:0!important;padding:0!important;font-weight:400;line-height:1.45;cursor:pointer}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) .wapf-label-text{padding-left:0}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input[type=checkbox],
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input[type=radio]{
	-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;
	display:inline-grid!important;place-content:center;float:none!important;flex:0 0 20px!important;
	box-sizing:border-box!important;width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important;min-height:20px!important;max-height:20px!important;
	margin:1px 0 0!important;padding:0!important;
	border:2px solid #cdc6e6!important;border-radius:6px!important;background:#fff!important;
	box-shadow:none!important;outline:0!important;font-size:0!important;line-height:0!important;
	vertical-align:middle;cursor:pointer;transition:border-color .15s,background-color .15s,box-shadow .15s
}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input[type=radio]{border-radius:50%!important}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input[type=checkbox]::before{content:"";display:block;width:11px;height:11px;background:#fff;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0,43% 62%);transform:scale(0);transition:transform .12s ease}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input[type=radio]::before{content:"";display:block;width:8px;height:8px;border-radius:50%;background:#fff;transform:scale(0);transition:transform .12s ease}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input[type=checkbox]::after,
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input[type=radio]::after{display:none!important;content:none!important}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input:checked{border-color:#794aff!important;background:#794aff!important}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input:checked::before{transform:scale(1)}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input:hover{border-color:#794aff!important}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input:focus,
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input:focus-visible{box-shadow:0 0 0 3px rgba(121,74,255,.25)!important}
.wapf-field-input .wapf-checkable:not(.pfp-swatch) input:disabled{opacity:.5;cursor:not-allowed}

/* Repeated copies (one per item) */
.pfp-copy-no{opacity:.75}

/* Multi-select dropdown */
.wapf-field-input select.pfp-multi{min-height:96px;padding:6px}

/* Image and color swatches */
.pfp-swatches{display:flex;flex-wrap:wrap;gap:10px}
.pfp-swatch{margin:0;position:relative}
.pfp-swatch .wapf-input-label{display:flex;flex-direction:column;align-items:center;gap:6px;margin:0;padding:6px;border:2px solid #e4e1ee;border-radius:12px;background:#fff;cursor:pointer;text-align:center;transition:border-color .15s,box-shadow .15s}
.pfp-swatch .wapf-input-label:hover{border-color:#b9a6ff}
.wapf-field-input .pfp-swatch input.pfp-swatch__input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;float:none;pointer-events:none}
.pfp-swatch.wapf-checked .wapf-input-label{border-color:#794aff;box-shadow:0 0 0 3px rgba(121,74,255,.15)}
.pfp-swatch .wapf-input-label:focus-within{outline:2px solid #794aff;outline-offset:2px}
.pfp-swatch__media{display:block;width:84px;height:84px;border-radius:8px;overflow:hidden;background:#f4f2fa}
.pfp-swatch__media img{display:block;width:100%;height:100%;object-fit:cover}
.pfp-swatch__color{display:block;width:34px;height:34px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.pfp-swatches--color .wapf-input-label{flex-direction:row;padding:6px 12px 6px 6px;border-radius:999px}
.pfp-swatch .wapf-label-text{padding-left:0;font-size:13px;line-height:1.3;max-width:120px}

/* File upload */
.pfp-file__drop{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;margin:0;padding:16px;border:2px dashed #d9d4ea;border-radius:12px;background:#faf9fd;cursor:pointer;text-align:center;transition:border-color .15s,background-color .15s}
.pfp-file__drop:hover,.pfp-file__drop:focus-within{border-color:#794aff;background:#f6f2ff}
.pfp-file__picker{position:absolute!important;opacity:0;width:1px;height:1px;overflow:hidden}
.pfp-file__cta{font-weight:700;color:#794aff}
.pfp-file__rules{font-size:12px;opacity:.7}
.pfp-file__list{list-style:none;margin:8px 0 0;padding:0}
.pfp-file__item{display:flex;align-items:center;gap:8px;margin:0 0 6px;padding:6px 10px;border:1px solid #ece8f6;border-radius:8px;background:#fff;font-size:13px}
.pfp-file__name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pfp-file__item.is-busy .pfp-file__name{opacity:.6}
.pfp-file__spin{flex:0 0 auto;width:14px;height:14px;border:2px solid #d9d4ea;border-top-color:#794aff;border-radius:50%;animation:pfp-spin .8s linear infinite}
.pfp-file__remove{flex:0 0 auto;padding:0 4px;border:0;background:none;color:#8a84a3;font-size:18px;line-height:1;cursor:pointer}
.pfp-file__remove:hover{color:#e5484d}

/* Messages under a field */
.pfp-error{margin-top:6px;color:#e5484d;font-size:13px;font-weight:600}

@keyframes pfp-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.pfp-file__spin{animation-duration:2s}.wapf-field-input .wapf-checkable input::before{transition:none}}
