.product-description-toolbar{display:flex;flex-wrap:wrap;gap:.25rem;margin:.4rem 0;}
.product-description-toolbar button{font:inherit;padding:.3rem .5rem;min-height:32px;}
.product-description-editor{min-height:220px;max-height:650px;overflow:auto;resize:vertical;background:#fff;border:1px solid #9aa7b9;border-radius:.35rem;padding:.65rem;}
.product-description-editor:focus{outline:2px solid #174ea6;}

/* ============================================================================
   Description rendering — the editor and the storefront share ONE clean,
   theme-driven look, so what you type is what ships. Imported fixed widths,
   white background boxes and heading-inherited bold (from content pasted
   inside an <h3>, fixed-width <table>s, etc.) are neutralised so pasted and
   legacy content reflows cleanly, the way a modern store renders it.
   ============================================================================ */
.product-description-editor,.product-description{font-size:15px;line-height:1.6;color:#000;}
.product-description{white-space:normal;overflow-x:auto;}

/* Imported inline layout must never win over our container */
.product-description *,.product-description-editor *{max-width:100%!important;}
.product-description [style*=background],.product-description-editor [style*=background]{background:transparent!important;}

.product-description-editor p,.product-description p{margin:0 0 .9rem;}
.product-description-editor ul,.product-description-editor ol,.product-description ul,.product-description ol{margin:0 0 .9rem;padding-left:1.4rem;}
.product-description-editor li,.product-description li{margin:.25rem 0;}
.product-description-editor img,.product-description img{max-width:100%;height:auto;border-radius:6px;}
.product-description-editor iframe,.product-description iframe,.product-description-editor video,.product-description video{width:100%;aspect-ratio:16/9;border:0;}

/* Tables — clean, all-white spec layout: full width, roomy cells, no borders,
   grids or shading, and a font-weight reset so content trapped inside an <h3>
   stops rendering bold. Just structure and spacing, like a modern store. */
.product-description-editor table,.product-description table{width:100%!important;border-collapse:collapse;margin:0 0 1.3rem;font-size:inherit!important;background:#fff;}
.product-description-editor table:last-child,.product-description table:last-child{margin-bottom:0;}
.product-description-editor td,.product-description-editor th,.product-description td,.product-description th{border:0;padding:.5rem .75rem;text-align:left;vertical-align:top;font-size:inherit;font-weight:400;line-height:1.5;overflow-wrap:anywhere;background:#fff;}
.product-description-editor th,.product-description th{font-weight:650;}

.product-description-toolbar[hidden],.product-description-editor[hidden]{display:none;}

.product-description-toolbar label{display:grid;gap:.15rem;font-size:.8rem;}
.product-description-toolbar select{width:auto!important;min-height:30px!important;}
.product-description-toolbar input[type=color]{width:42px!important;min-height:30px!important;padding:2px!important;}
.description-html-dialog{width:min(900px,95vw);border:1px solid #aebec9;border-radius:8px;padding:16px;}
.description-html-dialog textarea{display:block;width:100%;font:13px/1.4 monospace;margin-bottom:12px;}
.description-html-dialog button{margin-right:8px;padding:8px 12px;}

/* Smaller controls around the editor, without shrinking the saved description. */
.compact-product-editor .product-description-toolbar{gap:3px;margin:.3rem 0;align-items:end;}
.compact-product-editor .product-description-toolbar button{font-size:12px;line-height:1.2;min-height:27px;padding:3px 6px;width:auto;}
.compact-product-editor .product-description-toolbar label{display:flex;flex-direction:column;flex:0 0 auto;gap:2px;font-size:11px;margin:0;}
.compact-product-editor .product-description-toolbar select{font-size:12px!important;min-height:27px!important;padding:2px 5px;width:auto!important;max-width:126px;}
.compact-product-editor .product-description-toolbar select[data-description-style="font-size"]{max-width:74px;}
.compact-product-editor .product-description-toolbar select[data-description-style="line-height"]{max-width:68px;}
.compact-product-editor .product-description-toolbar input[type=color]{width:34px!important;min-height:27px!important;height:27px;padding:2px!important;}
.compact-product-editor .product-description-editor{min-height:195px;padding:.5rem;}
@media(pointer:coarse){
 .compact-product-editor .product-description-toolbar button,.compact-product-editor .product-description-toolbar select,.compact-product-editor .product-description-toolbar input[type=color]{min-height:44px!important;}
 .compact-product-editor .product-description-toolbar input[type=color]{height:44px;}
}
