/* Poster uses the shared modal and editor controls with paper-specific geometry. */
.cc-poster-dialog .canvas-container::after { content: none; }
.cc-poster-dialog .cc-yard-canvas-space { aspect-ratio: 2 / 3; flex: 1; max-height: 100%; }
.cc-poster-dialog[data-stage="1"] .cc-yard-controls { width: min(860px, 100%); }
.cc-poster-dialog[data-stage="1"] .cc-yard-controls { height: 100%; }
.cc-poster-dialog :is(.cc-poster-size-grid,.cc-yard-method) > p { display: contents; }
.cc-poster-dialog .cc-yard-method { grid-template-columns: repeat(2,minmax(0,1fr)); }
.cc-poster-dialog[data-mode="upload"]:not([data-stage="1"]) .cc-yard-body { display: grid; }
.cc-poster-dialog[data-mode="upload"]:not([data-stage="1"]) .cc-yard-controls { width: 100%; }
.cc-poster-dialog .cc-yard-preview { overflow: hidden; }
.cc-poster-dialog .cc-poster-sizes { margin-bottom: 22px; }
.cc-poster-dialog .cc-poster-ratios { margin: 0 0 24px; }
.cc-poster-ratios legend small { display: block; margin-top: 4px; color: #68716e; font-size: 12px; font-weight: 400; }
.cc-poster-ratio-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.cc-poster-ratio-grid > p { display: contents; }
.cc-poster-ratio-grid label { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 68px; border: 1px solid #dce4e0; border-radius: 6px; cursor: pointer; }
.cc-poster-ratio-grid input { margin: 0; accent-color: #2f7d71; }
.cc-poster-ratio-shape { display: block; flex: none; height: 32px; border: 1px solid #68716e; background: #f5f7f6; }
.cc-poster-ratio-grid strong { font-size: 14px; font-weight: 550; }
.cc-poster-ratio-grid label:has(:checked) { border-color: #2f7d71; background: #eff6f3; box-shadow: inset 0 0 0 1px #2f7d71; }
.cc-poster-size-grid label[hidden] { display: none !important; }
.cc-poster-sizes legend small { display: block; margin-top: 4px; color: #68716e; font-size: 12px; font-weight: 400; }
.cc-poster-size-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.cc-poster-size-grid label { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; column-gap: 8px; min-height: 92px; padding: 12px; border: 1px solid #dce4e0; border-radius: 6px; cursor: pointer; }
.cc-poster-size-grid input { margin: 0; accent-color: #2f7d71; }
.cc-poster-size-grid strong { font-size: 15px; font-weight: 550; }
.cc-poster-size-grid :is(small,span) { grid-column: 2; }
.cc-poster-size-grid small { font-size: 12px; color: #68716e; }
.cc-poster-size-grid span { font-size: 14px; font-variant-numeric: tabular-nums; }
.cc-poster-size-grid label:has(:checked) { border-color: #2f7d71; background: #eff6f3; box-shadow: inset 0 0 0 1px #2f7d71; }
.cc-poster-upload-preview { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 100%; min-height: 0; max-height: calc(100% - 66px); background: #fff; box-shadow: 0 4px 22px rgb(30 41 37 / 12%); overflow: hidden; }
.cc-poster-upload-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cc-poster-dialog .cc-poster-fit-status { width: 100%; font-size: 12px; line-height: 1.5; }
.cc-poster-dialog .cc-poster-pdf { padding: 24px; text-align: center; }
.cc-poster-review-size { margin: 0 0 24px; color: #68716e; font-size: 13px; }
.cc-poster-dialog .cc-poster-upload-policy { margin: 0 0 16px; color: #68716e; font-size: 13px; line-height: 1.55; }
.cc-poster-dialog .cc-yard-review .cc-yard-quantity-field { margin: 0 0 24px; padding-bottom: 22px; border-bottom: 1px solid #dce4e0; }
.cc-poster-field { display: grid; gap: 8px; margin: 0 0 20px; }
.cc-poster-field > label { margin: 0; font-size: 14px; font-weight: 550; }
.cc-poster-field label span { color: #68716e; font-size: 12px; font-weight: 400; }
.cc-poster-dialog :is(.cc-poster-field input,.cc-poster-field textarea,.cc-yard-text-value) { display: block; box-sizing: border-box; width: 100%; margin: 0; padding: 10px 12px; border: 1px solid #dce4e0; border-radius: 5px; background: #fff; color: #303735; font: inherit; line-height: 1.5; box-shadow: none; }
.cc-poster-dialog textarea { resize: vertical; min-height: 80px; }
.cc-poster-dialog .cc-yard-text-tools textarea { margin-top: 8px; }
.cc-poster-dialog .cc-poster-upload-preview { width: auto; height: calc(100% - 70px); max-height: none; flex: 0 0 auto; }
.cc-poster-dialog :is(.cc-yard-preview,.cc-poster-upload-preview) > p:empty { display: none; }
.cc-poster-proof-flow { display: grid; gap: 18px; padding-top: 18px; border-top: 1px solid #dce4e0; }
.cc-poster-proof { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 14px; cursor: pointer; }
.cc-poster-proof input { flex: 0 0 17px; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #2f7d71; }
.cc-poster-from { color: #68716e; font-size: .7em; }
.single-product:has(.cc-poster-dialog) .wp-block-woocommerce-product-image-gallery img.wp-post-image { object-fit: contain; }
.single-product:has(.cc-poster-dialog) .wp-block-woocommerce-product-image-gallery { aspect-ratio: 1 / 1; background: #fff; }
.single-product:has(.cc-poster-dialog) .wp-block-woocommerce-product-image-gallery :is(.woocommerce-product-gallery,.flex-viewport,.woocommerce-product-gallery__wrapper,.woocommerce-product-gallery__image,.woocommerce-product-gallery__image>a) { display: block; height: 100%; margin: 0; }
.single-product:has(.cc-poster-dialog) .wp-block-woocommerce-product-image-gallery img.wp-post-image { display: block; width: 100%; height: 100%; }
@media (max-width: 760px) {
    .cc-poster-ratio-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .cc-poster-size-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cc-poster-dialog .cc-yard-method { grid-template-columns: 1fr; }
    .cc-poster-dialog[data-mode="upload"]:not([data-stage="1"]) .cc-yard-body { display: flex; }
    .cc-poster-dialog:not([data-stage="1"]) .cc-yard-preview { min-height: 32dvh; flex: 0 0 32dvh; border-right: 0; padding: 12px; }
    .cc-poster-dialog .cc-yard-controls { flex: 1; min-height: 0; }
    .cc-poster-dialog .cc-yard-preview .cc-poster-fit-status { font-size: 11px; }
}
