/**
 * The product editor's Media section ( 6.0.9, wp_easycart_admin_product_media, product-media-v2.js ).
 */
.ecmg-card { --ecmg-line: #dcdfe4; --ecmg-line2: #c3c8d0; --ecmg-tile: #f1f3f5; --ecmg-muted: #50575e; --ecmg-ink: #1d2327; --ecmg-accent: var(--ec-brand, #2271b1); --ecmg-bad: #b32d2e; position:relative; }
.ecmg-body { display:flex; flex-direction:column; gap:14px; }
.ecmg-card.is-dropping { outline:2px dashed var(--ecmg-accent); outline-offset:4px; }
.ecmg-card.is-dropping .ecmg-drop { border-color:var(--ecmg-accent); background:color-mix( in srgb, var(--ecmg-accent) 7%, #fff ); }

/* the grid */
.ecmg-grid { display:grid; grid-template-columns:repeat( auto-fill, minmax( 112px, 1fr ) ); grid-auto-flow:dense; gap:10px; }
.ecmg-grid:empty { display:none; }
.ecmg-tile { position:relative; aspect-ratio:1 / 1; border:1px solid var(--ecmg-line); border-radius:10px; overflow:hidden; background:var(--ecmg-tile); min-width:0; }
.ecmg-tile.is-main { grid-column:span 2; grid-row:span 2; }
.ecmg-tile[draggable="true"] { cursor:grab; }
.ecmg-tile.is-dragging { opacity:.35; }
.ecmg-tile.is-drop-before { box-shadow:-4px 0 0 0 var(--ecmg-accent); }
.ecmg-tile.is-drop-after { box-shadow:4px 0 0 0 var(--ecmg-accent); }
.ecmg-tile.is-selected { border-color:var(--ecmg-accent); box-shadow:0 0 0 2px var(--ecmg-accent); }
.ecmg-tile.ecpc-is-on { border-color:var(--ecmg-ink); }
.ecmg-tile.is-error { border-color:var(--ecmg-bad); }
.ecmg-open { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; border:0; background:transparent; cursor:pointer; display:grid; place-items:center; }
.ecmg-tile[draggable="true"] .ecmg-open { cursor:grab; }
.ecmg-open:focus { outline:none; }
.ecmg-open:focus-visible { outline:3px solid var(--ecmg-accent); outline-offset:-3px; border-radius:10px; }
.ecmg-open img { width:100%; height:100%; object-fit:contain; display:block; pointer-events:none; }
.ecmg-nopic { font-size:28px; color:var(--ecmg-muted); }
.ecmg-badge { position:absolute; top:8px; left:8px; z-index:2; padding:2px 7px; border-radius:6px; background:rgba( 17, 24, 39, .8 ); color:#fff; font:700 10.5px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; letter-spacing:.04em; text-transform:uppercase; pointer-events:none; transition:left .12s; }
.ecmg-play { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.ecmg-play span { width:40px; height:40px; border-radius:50%; background:rgba( 17, 24, 39, .72 ); position:relative; }
.ecmg-play span::after { content:""; position:absolute; left:16px; top:12px; border-style:solid; border-width:8px 0 8px 13px; border-color:transparent transparent transparent #fff; }
.ecmg-kind { position:absolute; right:8px; bottom:8px; z-index:2; padding:1px 7px; border-radius:6px; background:rgba( 17, 24, 39, .72 ); color:#fff; font:600 10.5px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; pointer-events:none; }
.ecmg-tile.is-over .ecmg-open img { opacity:.4; }
.ecmg-over { position:absolute; left:6px; right:6px; top:50%; transform:translateY( -50% ); z-index:2; padding:3px 6px; border-radius:6px; background:#fcf0c3; color:#6e4a00; font:600 11px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; text-align:center; pointer-events:none; }

/* selecting */
.ecmg-pick { position:absolute; top:6px; left:6px; z-index:3; width:24px; height:24px; display:grid; place-items:center; border-radius:6px; background:rgba( 255, 255, 255, .95 ); box-shadow:0 1px 3px rgba( 0, 0, 0, .2 ); opacity:0; transition:opacity .12s; cursor:pointer; }
.ecmg-pick input[type="checkbox"] { margin:0; width:16px; height:16px; min-width:16px; }
.ecmg-tile:hover .ecmg-pick, .ecmg-tile:focus-within .ecmg-pick, .ecmg-tile.is-selected .ecmg-pick, .ecmg-card.has-selected .ecmg-pick { opacity:1; }
.ecmg-tile:hover .ecmg-badge, .ecmg-tile:focus-within .ecmg-badge, .ecmg-tile.is-selected .ecmg-badge, .ecmg-card.has-selected .ecmg-badge { left:36px; }

/* tools */
.ecmg-tools { position:absolute; top:6px; right:6px; z-index:3; display:flex; gap:4px; opacity:0; transition:opacity .12s; }
.ecmg-tile:hover .ecmg-tools, .ecmg-tile:focus-within .ecmg-tools { opacity:1; }
.ecmg-tool { width:28px; height:28px; display:grid; place-items:center; margin:0; padding:0; border:0; border-radius:7px; background:rgba( 255, 255, 255, .95 ); color:var(--ecmg-ink); box-shadow:0 1px 3px rgba( 0, 0, 0, .2 ); cursor:pointer; }
.ecmg-tool:hover { color:var(--ecmg-accent); }
.ecmg-tool:focus-visible { outline:2px solid var(--ecmg-accent); outline-offset:1px; }
.ecmg-tool[data-ecmg-act="remove"]:hover { color:var(--ecmg-bad); }
@media ( hover:none ) {
	.ecmg-tools, .ecmg-pick { opacity:1; }
	.ecmg-badge { left:36px; }
}

/* the photo check's mark sits at the tile's foot */
.ecmg-tile > .ecpc-mark { left:6px; bottom:6px; z-index:3; }

/* uploads */
.ecmg-up { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:10px; text-align:center; }
.ecmg-up img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; opacity:.35; }
.ecmg-up-name { position:relative; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; color:var(--ecmg-ink); }
.ecmg-up-error { position:relative; font-size:12px; line-height:1.35; color:var(--ecmg-bad); }
.ecmg-up .ecmg-tool { position:absolute; top:6px; right:6px; }
.ecmg-progress { position:relative; width:80%; height:6px; border-radius:99px; background:rgba( 17, 24, 39, .12 ); overflow:hidden; }
.ecmg-progress span { position:absolute; left:0; top:0; bottom:0; background:var(--ecmg-accent); transition:width .2s; }

/* add */
.ecmg-addwrap { display:flex; aspect-ratio:1 / 1; min-width:0; }
.ecmg-add { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; margin:0; padding:10px; border:2px dashed var(--ecmg-line2); border-radius:10px; background:transparent; color:var(--ecmg-muted); font:inherit; font-size:12.5px; line-height:1.35; text-align:center; cursor:pointer; }
.ecmg-add b { color:var(--ecmg-ink); font-size:13px; }
.ecmg-add .ecmg-plus { font-size:24px; line-height:1; color:var(--ecmg-accent); }
.ecmg-add:hover, .ecmg-add:focus-visible { border-color:var(--ecmg-accent); color:var(--ecmg-ink); outline:none; }
.ecmg-add.is-locked { border-style:dashed; gap:6px; }
.ecmg-add.is-locked b { font-weight:500; font-size:12.5px; }

/* the drop zone */
.ecmg-drop { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 14px; padding:12px 14px; border:2px dashed var(--ecmg-line2); border-radius:12px; }
.ecmg-drop-say { display:flex; align-items:center; gap:10px; min-width:0; color:var(--ecmg-muted); font-size:13px; line-height:1.4; }
.ecmg-drop-say svg { flex:none; color:var(--ecmg-accent); }
.ecmg-drop-say b { color:var(--ecmg-ink); }
.ecmg-drop-btns { display:flex; flex-wrap:wrap; gap:6px; }
.ecmg-link { flex:1 1 100%; display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
.ecmg-link input[type="url"] { flex:1 1 260px; min-width:0; min-height:32px; }
.ecmg-link-say { flex:1 1 100%; font-size:12.5px; color:var(--ecmg-muted); }
/* why a link can't be added: the box and the words in the error colour, with a mark */
.ecmg-link-say.is-bad { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; padding:8px 10px; border-radius:8px; background:#fcf0f1; border:1px solid #f1c2c4; color:#8a2424; font-size:13px; line-height:1.45; }
.ecmg-link-say.is-bad::before { content:"!"; flex:none; display:inline-grid; place-items:center; width:18px; height:18px; border-radius:50%; background:var(--ecmg-bad); color:#fff; font-weight:700; font-size:12px; line-height:1; }
.ecmg-link input[aria-invalid="true"] { border-color:var(--ecmg-bad); box-shadow:0 0 0 1px var(--ecmg-bad); }
.ecmg-link-page { flex:1 1 100%; display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:8px; border-radius:8px; background:#fff; border:1px solid var(--ecmg-line); color:var(--ecmg-ink); }
.ecmg-link-page img { width:72px; height:72px; object-fit:cover; border-radius:6px; background:var(--ecmg-tile); flex:none; }
.ecmg-link-page-say { flex:1 1 140px; }

/* the bulk bar */
.ecmg-bulk { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 10px; border-radius:10px; background:color-mix( in srgb, var(--ecmg-accent) 8%, #fff ); border:1px solid color-mix( in srgb, var(--ecmg-accent) 30%, #fff ); }
.ecmg-bulk-count { font-weight:600; margin-right:auto; font-variant-numeric:tabular-nums; }
.ecmg-danger { color:var(--ecmg-bad) !important; }
.ecmg-quiet { background:transparent !important; border-color:transparent !important; box-shadow:none !important; }

/* notes */
.ecmg-legacy { padding:10px 12px; border-radius:10px; background:#fcf9e8; border:1px solid #f0d77a; color:#4d3b00; font-size:13px; line-height:1.45; }
.ecmg-locked-note { margin:0; padding:10px 12px; border-radius:10px; background:#f0f6fc; border:1px solid #c5d9ed; font-size:13px; }
.ecmg-upsell { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; font-size:13px; color:var(--ecmg-muted); }
.ecmg-upsell .ecv2-chip { flex:none; }
.ecmg-upsell .ecv2-btn { margin-left:auto; }
.ecpc-gallery:empty { display:none; }

/* the details window: a side panel */
dialog.ecmg-details { position:fixed; inset:0 0 0 auto; margin:0; width:min( 440px, 100vw ); max-width:100vw; height:100%; max-height:100%; padding:0; border:0; border-left:1px solid #dcdfe4; background:#fff; color:#1d2327; box-shadow:-10px 0 40px rgba( 0, 0, 0, .18 ); display:none; flex-direction:column; box-sizing:border-box; font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size:13px; }
dialog.ecmg-details[open] { display:flex; }
dialog.ecmg-details::backdrop { background:rgba( 17, 24, 39, .35 ); }
.ecmg-d-head { display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid #dcdfe4; }
.ecmg-d-head h3 { margin:0; font-size:16px; line-height:1.3; }
.ecmg-d-head .ecv2-btn { margin-left:auto; }
.ecmg-d-body { flex:1; overflow:auto; padding:16px 18px; display:flex; flex-direction:column; gap:14px; }
.ecmg-d-body > * { flex-shrink:0; }
.ecmg-d-prev { display:grid; place-items:center; min-height:160px; padding:10px; border-radius:10px; background:#f1f3f5; }
.ecmg-d-prev.can-focus { cursor:crosshair; }
.ecmg-d-prev:focus { outline:none; }
.ecmg-d-prev.can-focus:focus-visible { outline:3px solid var(--ec-brand, #2271b1); outline-offset:2px; }
.ecmg-d-frame { position:relative; display:inline-block; max-width:100%; line-height:0; }
.ecmg-d-frame img { max-width:100%; max-height:300px; display:block; }
.ecmg-d-dot { position:absolute; width:22px; height:22px; margin:-11px 0 0 -11px; border:3px solid #fff; border-radius:50%; background:rgba( 34, 113, 177, .55 ); box-shadow:0 0 0 1px rgba( 0, 0, 0, .35 ), 0 2px 6px rgba( 0, 0, 0, .3 ); pointer-events:none; }
.ecmg-d-prev:not(.can-focus) .ecmg-d-dot { display:none; }
.ecmg-d-help { margin:0; font-size:12.5px; line-height:1.45; color:#50575e; }
.ecmg-d-field { display:flex; flex-direction:column; gap:6px; }
.ecmg-d-field label { font-weight:600; }
.ecmg-d-field textarea { width:100%; min-height:56px; resize:vertical; box-sizing:border-box; }
.ecmg-d-alt-btns { display:flex; flex-wrap:wrap; gap:6px; }
/* Write with AI's words, in the window ( nothing under a modal dialog can be seen ) */
.ecmg-d-say { margin:0; padding:8px 10px; border-radius:8px; background:#f0f6fc; border:1px solid #c5d9ed; color:#1d2327; font-size:12.5px; line-height:1.45; }
.ecmg-d-say.is-bad { background:#fcf0f1; border-color:#f1c2c4; color:#8a2424; }
#ecmg_d_alt_ai.is-busy { cursor:progress; }
.ecmg-d-video { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:#50575e; line-height:1.45; }
.ecmg-d-facts { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; margin:0; font-size:13px; }
.ecmg-d-facts:empty { display:none; }
.ecmg-d-facts dt { color:#50575e; }
.ecmg-d-facts dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.ecmg-d-facts dd.is-bad { color:#b32d2e; font-weight:600; }
.ecmg-d-move { display:flex; flex-wrap:wrap; gap:6px; }
.ecmg-d-foot { display:flex; flex-wrap:wrap; gap:8px; padding:12px 18px; border-top:1px solid #dcdfe4; }
.ecmg-d-foot #ecmg_d_done { margin-left:auto; }

/* Undo */
.ecmg-toast { position:fixed; left:50%; bottom:24px; z-index:100002; transform:translateX( -50% ); display:flex; align-items:center; gap:14px; max-width:calc( 100vw - 32px ); padding:10px 14px; border-radius:10px; background:#1d2327; color:#fff; box-shadow:0 8px 24px rgba( 0, 0, 0, .25 ); font-size:13px; line-height:1.4; }
.ecmg-toast button { margin:0; padding:2px 6px; border:0; border-radius:6px; background:transparent; color:#72aee6; font:inherit; font-weight:600; cursor:pointer; }
.ecmg-toast button:hover, .ecmg-toast button:focus-visible { background:rgba( 255, 255, 255, .12 ); outline:none; }

@media ( max-width:600px ) {
	.ecmg-grid { grid-template-columns:repeat( 3, 1fr ); }
	.ecmg-tile.is-main { grid-column:span 3; grid-row:span 2; aspect-ratio:3 / 2; }
	.ecmg-tool[data-ecmg-act="main"] { display:none; }
	.ecmg-drop { flex-direction:column; align-items:stretch; }
	.ecmg-drop-btns .ecv2-btn { flex:1; justify-content:center; }
	.ecmg-toast { bottom:calc( 76px + env( safe-area-inset-bottom, 0px ) ); }
}

/* hidden parts stay hidden whatever their display */
.ecmg-card [hidden], dialog.ecmg-details [hidden], .ecmg-toast[hidden] { display:none !important; }

/* the details window sits on the page, outside the editor's own button colours */
dialog.ecmg-details .ecv2-btn-primary { background:var(--ec-brand, #2271b1); border-color:var(--ec-brand, #2271b1); color:#fff; }
dialog.ecmg-details .ecv2-btn-primary:hover, dialog.ecmg-details .ecv2-btn-primary:focus-visible { background:color-mix( in srgb, var(--ec-brand, #2271b1) 85%, #000 ); color:#fff; }

/* the photo check's mark is a target of its own over the tile */
.ecmg-tile > button.ecpc-mark { min-height:24px; min-width:24px; }

/* Photos per option ( PR 2 ): the switch, which option the photos follow, the choices as tabs */
.ecmg-per { display:flex; flex-direction:column; gap:10px; padding-bottom:12px; border-bottom:1px solid var(--ecmg-line); }
.ecmg-per-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.ecmg-per-icon { flex:none; color:var(--ecmg-accent); }
.ecdv2-product .ecmg-per-switch, .ecmg-per-switch { display:inline-flex; align-items:center; gap:8px; min-height:32px; margin:0; padding:0; border:0; background:transparent; color:var(--ecmg-ink); font:inherit; font-size:13.5px; font-weight:600; text-align:left; cursor:pointer; box-shadow:none; }
.ecmg-per-switch:focus-visible { outline:2px solid var(--ecmg-accent); outline-offset:3px; border-radius:6px; }
.ecmg-per-switch:disabled { cursor:default; opacity:.65; }
.ecmg-per-track { position:relative; flex:none; width:32px; height:18px; border-radius:99px; background:#a7aaad; transition:background .12s; }
.ecmg-per-track::after { content:""; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba( 0, 0, 0, .2 ); transition:left .12s; }
.ecmg-per-switch[aria-checked="true"] .ecmg-per-track { background:var(--ecmg-accent); }
.ecmg-per-switch[aria-checked="true"] .ecmg-per-track::after { left:16px; }
.ecmg-per-follow { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--ecmg-muted); }
.ecmg-per-follow select { min-height:30px; max-width:260px; font-size:13px; }
.ecmg-menu-wrap { position:relative; margin-left:auto; }
.ecmg-menu-btn { min-width:32px; justify-content:center; }
.ecmg-menu { position:absolute; top:calc( 100% + 4px ); right:0; z-index:20; display:flex; flex-direction:column; min-width:220px; padding:4px; border:1px solid var(--ecmg-line); border-radius:10px; background:#fff; box-shadow:0 8px 24px rgba( 17, 24, 39, .14 ); }
.ecmg-menu [role^="menuitem"] { display:flex; align-items:center; gap:8px; width:100%; min-height:34px; margin:0; padding:6px 10px; border:0; border-radius:7px; background:transparent; color:var(--ecmg-ink); font:inherit; font-size:13px; text-align:left; text-decoration:none; cursor:pointer; box-sizing:border-box; }
.ecmg-menu [role^="menuitem"]:hover, .ecmg-menu [role^="menuitem"]:focus-visible { background:#f0f0f1; color:var(--ecmg-ink); outline:none; }
.ecmg-menu [role="menuitemcheckbox"]::before { content:""; flex:none; width:16px; height:16px; border:1.5px solid #8c8f94; border-radius:4px; background:#fff center / 12px no-repeat; }
.ecmg-menu [role="menuitemcheckbox"][aria-checked="true"]::before { border-color:var(--ecmg-accent); background-color:var(--ecmg-accent); background-image:url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" ); }
.ecmg-menu [role="menuitemcheckbox"][aria-checked="mixed"]::before { border-color:var(--ecmg-accent); background-color:var(--ecmg-accent); background-image:url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E" ); }
.ecmg-bulk-for { position:relative; }
.ecmg-bulk-for .ecmg-menu { left:0; right:auto; }
.ecmg-tabs { display:flex; flex-wrap:wrap; gap:6px; }
.ecdv2-product .ecmg-tab, .ecmg-tab { display:inline-flex; align-items:center; gap:6px; min-height:32px; margin:0; padding:3px 11px 3px 9px; border:1px solid var(--ecmg-line2); border-radius:99px; background:#fff; color:var(--ecmg-ink); font:inherit; font-size:13px; line-height:1.3; cursor:pointer; box-shadow:none; }
.ecmg-tab:hover { border-color:var(--ecmg-muted); }
.ecmg-tab:focus-visible { outline:2px solid var(--ecmg-accent); outline-offset:2px; }
.ecmg-tab[aria-selected="true"] { border-color:var(--ecmg-accent); background:color-mix( in srgb, var(--ecmg-accent) 9%, #fff ); color:var(--ecmg-accent); font-weight:600; }
.ecmg-tab-n { min-width:18px; padding:0 5px; border-radius:99px; background:#f0f0f1; color:var(--ecmg-muted); font-size:11.5px; font-weight:600; text-align:center; font-variant-numeric:tabular-nums; }
.ecmg-tab[aria-selected="true"] .ecmg-tab-n { background:var(--ecmg-accent); color:#fff; }
.ecmg-tab.is-empty:not([aria-selected="true"]) .ecmg-tab-n { background:#fcf0c3; color:#6e4a00; }
.ecmg-swatch { flex:none; width:16px; height:16px; border-radius:50%; object-fit:cover; box-shadow:0 0 0 1px rgba( 0, 0, 0, .15 ); }
.ecmg-per-say { margin:0; font-size:12.5px; line-height:1.45; color:var(--ecmg-muted); }
.ecmg-per-say.is-warn { padding:7px 10px; border-radius:8px; background:#fcf9e8; border:1px solid #f0d77a; color:#4d3b00; }
.ecmg-per.is-locked { flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px 10px; padding:10px 12px; border:1px dashed var(--ecmg-line2); border-radius:10px; }
.ecmg-per-locked-words { font-weight:600; font-size:13.5px; color:var(--ecmg-ink); }
.ecmg-per.is-locked .ecv2-btn { margin-left:auto; }

/* All photos: the choices each photo shows for, along its foot */
.ecmg-for { position:absolute; left:6px; right:6px; bottom:6px; z-index:2; display:flex; flex-wrap:wrap; gap:3px; max-height:42px; overflow:hidden; pointer-events:none; }
.ecmg-for span { max-width:100%; padding:0 7px; border-radius:99px; background:rgba( 255, 255, 255, .94 ); color:var(--ecmg-ink); font:600 10.5px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; box-shadow:0 0 0 1px rgba( 0, 0, 0, .08 ); }
.ecmg-tile.has-for > .ecpc-mark, .ecmg-tile.has-for .ecmg-kind { bottom:30px; }

/* the details window: Shows for */
.ecmg-d-for { margin:0; padding:0; border:0; display:flex; flex-direction:column; gap:8px; }
.ecmg-d-for legend { padding:0; margin:0 0 6px; font-weight:600; }
.ecmg-d-for-list { display:flex; flex-wrap:wrap; gap:6px; }
.ecmg-d-for-item { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:3px 11px 3px 8px; border:1px solid #c3c8d0; border-radius:99px; cursor:pointer; }
.ecmg-d-for-item:has( input:checked ) { border-color:var(--ec-brand, #2271b1); background:color-mix( in srgb, var(--ec-brand, #2271b1) 8%, #fff ); }
.ecmg-d-for-item input[type="checkbox"] { margin:0; }

/* the image sets import window */
dialog.ecmg-import { width:min( 520px, calc( 100vw - 32px ) ); padding:0; border:0; border-radius:12px; background:#fff; color:#1d2327; box-shadow:0 20px 60px rgba( 0, 0, 0, .3 ); font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size:13px; }
dialog.ecmg-import::backdrop { background:rgba( 17, 24, 39, .35 ); }
dialog.ecmg-import form { display:flex; flex-direction:column; margin:0; }
.ecmg-import-say { margin:0; line-height:1.5; }
.ecmg-import-label { font-weight:600; }
dialog.ecmg-import .ecmg-d-foot { justify-content:flex-end; }
dialog.ecmg-import [hidden] { display:none !important; }
dialog.ecmg-import .ecv2-btn-primary { background:var(--ec-brand, #2271b1); border-color:var(--ec-brand, #2271b1); color:#fff; }
@media ( max-width:600px ) {
	/* the switch's words wrap so ⋯ stays on its row; Photos follow gets the next */
	.ecdv2-product .ecmg-per-switch, .ecmg-per-switch { flex:1 1 0; min-width:0; }
	.ecmg-per-words { min-width:0; }
	.ecmg-menu-wrap { order:2; }
	.ecmg-per-follow { order:3; flex:1 1 100%; }
	.ecmg-per-follow select { flex:1; max-width:none; }
}
/* PR 3: the products list's Photos window ( #ecmg_dialog ) and the gallery outside the editor */
dialog.ecmg-dialog { width:min( 880px, calc( 100vw - 32px ) ); max-width:none; max-height:calc( 100vh - 48px ); margin:auto; padding:0; border:0; border-radius:14px; background:#fff; color:#1d2327; box-shadow:0 20px 60px rgba( 15, 23, 42, .3 ); font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size:13px; }
dialog.ecmg-dialog::backdrop { background:rgba( 15, 23, 42, .45 ); }
.ecmg-dlg-box { display:flex; flex-direction:column; max-height:calc( 100vh - 48px ); }
.ecmg-dlg-head { display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid #dcdfe4; }
.ecmg-dlg-titles { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; min-width:0; flex:1 1 auto; }
.ecmg-dlg-title { margin:0; font-size:16px; line-height:1.3; overflow-wrap:anywhere; }
.ecmg-dlg-sub { color:#50575e; font-size:12.5px; }
.ecmg-dlg-x { width:34px; height:34px; display:grid; place-items:center; margin:0; padding:0; border:0; border-radius:8px; background:transparent; color:#50575e; cursor:pointer; flex:none; }
.ecmg-dlg-x:hover { background:#f1f3f5; color:#1d2327; }
.ecmg-dlg-x:focus-visible { outline:2px solid var(--ec-brand, #2271b1); outline-offset:1px; }
.ecmg-dlg-body { padding:16px 18px; overflow:auto; min-height:120px; }
.ecmg-dlg-wait { display:flex; align-items:center; gap:10px; margin:24px 0; color:#50575e; font-size:13.5px; }
.ecmg-dlg-wait.is-bad { color:#b32d2e; }
.ecmg-spin { width:16px; height:16px; border:2px solid #dcdfe4; border-top-color:var(--ec-brand, #2271b1); border-radius:50%; animation:ecmg-spin .8s linear infinite; flex:none; }
@keyframes ecmg-spin { to { transform:rotate( 360deg ); } }
@media ( prefers-reduced-motion: reduce ) { .ecmg-spin { animation-duration:2.4s; } }
.ecmg-dlg-ask { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0 18px; padding:10px 12px; border:1px solid #f0c33c; border-radius:10px; background:#fcf9e8; color:#3c2c00; font-size:13px; }
.ecmg-dlg-ask[hidden] { display:none; }
.ecmg-dlg-ask-text { flex:1 1 220px; }
.ecmg-dlg-ask-btns { display:flex; flex-wrap:wrap; gap:8px; }
.ecmg-dlg-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; padding:12px 18px; border-top:1px solid #dcdfe4; }
.ecmg-dlg-state { margin-right:auto; color:#50575e; font-size:12.5px; }
.ecmg-in-dialog .ecmg-body, .ecmg-in-builder .ecmg-body { padding:0; }
@media ( max-width: 600px ) {
	dialog.ecmg-dialog { width:100vw; max-height:100%; height:100%; border-radius:0; }
	.ecmg-dlg-box { max-height:100%; height:100%; }
	.ecmg-dlg-body { flex:1 1 auto; }
	.ecmg-dlg-head { flex-wrap:wrap; }
	.ecmg-dlg-titles { flex-basis:calc( 100% - 44px ); }
	.ecmg-dlg-edit { order:3; }
}
