/* Isolated toolbar layer. Existing controls retain their IDs, handlers and permissions. */
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-bar { display: flex !important; flex-wrap: nowrap; align-items: center; gap: 12px; min-height: 76px; height: auto; margin: 0 10px 10px; padding: 14px 18px; border: 1px solid #dae4f3; border-radius: 18px; background: #fff; box-shadow: 0 6px 20px #233e6610; color: #183252; }
.smo-friendly-editor .smo-document-identity { display: flex; align-items: center; flex: 1 1 auto; gap: 12px; min-width: 0; }
.smo-friendly-editor .smo-document-name { display: grid; align-content: center; gap: 3px; flex: 1 1 auto; min-width: 0; }
.smo-friendly-editor .smo-document-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 10px; }
.smo-friendly-editor .smo-tool-icon { display: inline-grid; place-items: center; flex: 0 0 19px; width: 19px; height: 19px; pointer-events: none; }
.smo-friendly-editor .smo-tool-icon svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.smo-friendly-editor .smo-tool-caption { min-width: 0; line-height: 1.3; overflow-wrap: normal; word-break: normal; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor :is(.smo-document-bar,.smo-tools-bar) button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: auto; min-width: 0; height: auto; min-height: 42px; padding: 9px 13px; border: 1px solid #d9e3f3; border-radius: 11px; box-shadow: none; background: #fff; color: #365372; font-size: 12px; line-height: 1.3; font-weight: 650; letter-spacing: normal; text-transform: none; transform: none; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor :is(.smo-document-bar,.smo-tools-bar) button:hover { background: #f3f7fd; border-color: #a8bee9; transform: none; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor button:focus-visible { outline: 3px solid #8aa9ff; outline-offset: 2px; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-bar #back-to-templates-btn { border-color: transparent; padding-inline: 5px 11px; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #smo-stamp-name-btn { justify-content: flex-start; gap: 8px; min-height: 22px; max-width: 100%; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #193555; font-size: 16px; font-weight: 750; text-align: start; }
.smo-friendly-editor #smo-stamp-name-btn .smo-tool-icon { order: 2; width: 14px; flex-basis: 14px; color: #91a2b9; }
.smo-friendly-editor #smo-stamp-name-btn .smo-tool-icon svg { width: 14px; height: 14px; }
.smo-friendly-editor #smo-stamp-name-btn .smo-tool-caption { max-width: 390px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-name #draft-status { justify-self: start; width: auto; max-width: 100%; min-height: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #71869e; font-size: 10px; font-weight: 450; line-height: 1.3; letter-spacing: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-bar #download-menu-btn { flex: 0 0 auto; min-width: 112px; padding-inline: 15px; border-color: #315efb; background: #315efb; color: #fff; box-shadow: 0 4px 10px #315efb24; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-bar #download-menu-btn:hover { background: #244ee9; border-color: #244ee9; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #history-actions { display: flex; align-items: center; justify-content: center; gap: 4px; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #history-actions button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 7px; border-color: transparent; border-radius: 8px; background: transparent; color: #486581; }
.smo-friendly-editor #history-actions svg { width: 18px; height: 18px; }
.smo-friendly-editor .smo-document-actions #elements-trigger-btn { display: none !important; }
.smo-friendly-editor #editor-owner-select:not(.hidden) { max-width: 165px; width: auto; min-height: 36px; height: 36px; margin: 0; padding: 5px 9px; border-radius: 8px; font-size: 11px; }
.smo-friendly-editor .smo-document-more { display: none; }
.smo-friendly-editor .smo-toolbar-menu { position: relative; flex: 0 0 auto; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-tools-bar { position: sticky; top: calc(var(--wp-admin--admin-bar--height,0px) + 8px); z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 62px; height: auto; padding: 9px 12px; margin: 0 10px 12px; border: 1px solid #dae4f3; border-radius: 15px; background: #fff; box-shadow: 0 4px 14px #2342700b; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons { display: flex; align-items: center; justify-content: flex-start; flex: 1 1 auto; flex-wrap: nowrap; gap: 8px; width: auto; min-width: 0; max-width: none; padding: 0; margin: 0; overflow: visible; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons button { flex: 0 0 auto; flex-direction: row; width: max-content; max-width: none; min-width: 0; min-height: 42px; padding: 8px 12px; white-space: nowrap; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons .toolbar-btn-icon { display: inline-grid; place-items: center; flex: 0 0 19px; width: 19px; height: 19px; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons .toolbar-btn-label { width: auto; max-width: none; font-size: 12px; font-weight: 650; line-height: 1.3; letter-spacing: normal; overflow-wrap: normal; word-break: normal; white-space: nowrap; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons [data-add-text-picker] { color: #244ee9; background: #f0f5ff; border-color: #c9d9ff; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #plate-size-btn { flex: 0 1 auto; flex-wrap: wrap; gap: 3px 7px; min-width: 143px; max-width: 205px; padding: 7px 10px; font-size: 11px; }
.smo-friendly-editor #plate-size-btn small { color: #8396ae; font-size: 10px; line-height: 1.2; }
.smo-friendly-editor #plate-size-btn small strong { font-size: inherit; font-weight: 600; color: inherit; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #text-positions-btn { flex: 0 0 auto; flex-direction: row; width: auto; min-width: 0; height: auto; min-height: 42px; padding: 8px 11px; font-size: 12px; }
.smo-friendly-editor #text-positions-btn svg { flex: 0 0 18px; width: 18px; height: 18px; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #text-positions-btn.active,.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-toolbar-menu > button[aria-expanded="true"] { border-color: #6b92ff; background: #eaf1ff; color: #244ee9; }
.smo-friendly-editor #text-positions-btn.active::after { content: "✓"; font-size: 12px; }
.smo-friendly-editor .smo-toolbar-popover { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; display: grid; gap: 5px; width: 265px; max-width: calc(100vw - 30px); margin: 0; padding: 9px; border: 1px solid #d5e2f5; border-radius: 14px; background: #fff; box-shadow: 0 14px 40px #16375c29; }
.smo-friendly-editor .smo-toolbar-popover[hidden] { display: none !important; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-toolbar-popover button { justify-content: flex-start; width: 100%; max-width: none; height: auto; min-height: 42px; padding: 9px 10px; border-color: transparent; background: #fff; color: #385577; font-size: 12px; text-align: start; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-toolbar-popover button svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-toolbar-popover button[aria-pressed="true"] { background: #edf3ff; color: #244ee9; }
.smo-friendly-editor .smo-view-menu [aria-pressed="true"]::after { content: "✓"; margin-inline-start: auto; padding-inline-start: 9px; }
/* Keep the canvas visible while the independent element/control columns scroll. */
@media (min-width:1001px) {
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .center-panel {
    position: sticky;
    top: var(--smo-preview-sticky-top,calc(var(--wp-admin--admin-bar--height,0px) + 88px));
    align-self: start;
    min-height: 0;
    max-height: calc(100dvh - var(--smo-preview-sticky-top,88px) - 14px);
    grid-template-rows: auto minmax(0,1fr);
    z-index: 6;
  }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .center-panel .preview-wrap {
    min-height: 0;
    max-height: calc(100dvh - var(--smo-preview-sticky-top,88px) - 76px);
    overflow: auto;
  }
}
.smo-toolbar-dialog { box-sizing: border-box; width: min(460px,calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 28px); padding: 0; margin: auto; overflow: auto; border: 1px solid #d6e2f5; border-radius: 20px; background: #fff; color: #1b3655; box-shadow: 0 25px 80px #183c6840; font: 13px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-align: start; }
.smo-toolbar-dialog::backdrop { background: #112c4f70; backdrop-filter: blur(4px); }
.smo-toolbar-dialog * { box-sizing: border-box; min-width: 0; }
.smo-toolbar-dialog [hidden] { display: none !important; }
.smo-toolbar-dialog form { padding: 23px; margin: 0; }
.smo-toolbar-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.smo-toolbar-dialog h2 { padding: 0; margin: 0; color: #193555; font: 800 21px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.smo-toolbar-dialog button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; margin: 0; padding: 10px 16px; border: 1px solid #d6e1f3; border-radius: 10px; background: #fff; color: #3b587a; box-shadow: none; cursor: pointer; font: 650 12px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-transform: none; letter-spacing: normal; }
.smo-toolbar-dialog .smo-dialog-close { width: 30px; height: 30px; min-height: 30px; padding: 0; border: 0; background: #f2f5fb; font-size: 23px; font-weight: 400; }
.smo-toolbar-dialog .smo-dialog-content { display: grid; gap: 16px; }
.smo-toolbar-dialog label { display: grid; gap: 7px; margin: 0; color: #627a98; font-size: 11px; font-weight: 650; }
.smo-toolbar-dialog input[type="text"],.smo-toolbar-dialog select[id] { width: 100%; max-width: none; min-height: 43px; margin: 0; padding: 10px 12px; border: 1px solid #cbdaf1; border-radius: 10px; box-shadow: none; background: #fff; color: #193555; font: 13px/1.4 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.smo-toolbar-dialog footer { display: flex; justify-content: flex-end; gap: 9px; margin: 20px 0 0; padding: 0; }
.smo-toolbar-dialog .smo-dialog-confirm { background: #315efb; border-color: #315efb; color: #fff; }
.smo-toolbar-dialog .smo-dialog-error { margin: 10px 0 0; color: #c43c55; font-size: 12px; }
.smo-toolbar-dialog .smo-image-source-options { gap: 10px; }
.smo-toolbar-dialog .smo-image-source-options p { margin: 0 0 5px; color: #7489a3; font-size: 12px; }
.smo-toolbar-dialog .smo-image-source-options button { justify-content: flex-start; width: 100%; min-height: 68px; padding: 14px 16px; border-color: #d4e0f7; border-radius: 12px; background: #f5f8ff; color: #244ee9; font-size: 13px; }
.smo-toolbar-dialog .smo-tool-icon { flex: 0 0 30px; width: 30px; height: 30px; }
.smo-toolbar-dialog svg { display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.smo-toolbar-dialog :is(button,input,select):focus-visible { outline: 3px solid #8aa9ff; outline-offset: 2px; }
@media (max-width:1000px) {
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-bar { gap: 8px; padding: 12px; }
  .smo-friendly-editor #smo-stamp-name-btn .smo-tool-caption { max-width: 250px; }
  .smo-friendly-editor .smo-document-actions { gap: 5px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-tools-bar { gap: 6px; padding: 8px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons { gap: 6px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons button { padding: 7px 9px; }
}
@media (max-width:760px) {
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-bar { display: flex !important; min-height: 65px; gap: 6px; margin: 0 8px 8px; padding: 10px 9px; border-radius: 14px; }
  .smo-friendly-editor .smo-document-identity { gap: 5px; }
  .smo-friendly-editor .smo-document-actions { display: none; }
  .smo-friendly-editor .smo-document-more { display: block; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #back-to-templates-btn { min-width: 28px; min-height: 36px; padding: 6px 3px; }
  .smo-friendly-editor #back-to-templates-btn .smo-tool-caption,.smo-friendly-editor .smo-document-more > button .smo-tool-caption { display: none; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #smo-stamp-name-btn { font-size: 13px; min-height: 20px; }
  .smo-friendly-editor #smo-stamp-name-btn .smo-tool-caption { max-width: none; }
  .smo-friendly-editor #smo-stamp-name-btn .smo-tool-icon { display: none; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-name #draft-status { font-size: 9px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-document-bar #download-menu-btn { min-width: 83px; min-height: 37px; padding: 8px 9px; gap: 5px; font-size: 11px; }
  .smo-friendly-editor .smo-document-bar #download-menu-btn .smo-tool-icon { width: 16px; flex-basis: 16px; }
  .smo-friendly-editor .smo-document-bar #download-menu-btn svg { width: 16px; height: 16px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #smo-document-menu-btn { min-width: 30px; min-height: 36px; padding: 5px; border-color: transparent; }
  .smo-friendly-editor #smo-document-menu { width: 205px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #smo-document-menu #elements-trigger-btn { display: flex; }
  .smo-friendly-editor #editor-owner-select:not(.hidden) { max-width: 90px; font-size: 10px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-tools-bar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 0 8px 9px; padding: 8px; border-radius: 13px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons { display: contents; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons button,.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #plate-size-btn,.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #text-positions-btn,.stampmaker-online-stamp-editor #editor-page.smo-friendly-editor .smo-view-menu > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-width: 0; max-width: none; min-height: 57px; height: auto; padding: 7px 4px; font-size: 10px; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #shape-buttons .toolbar-btn-label { width: auto; font-size: 10px; line-height: 1.2; max-width: 100%; white-space: normal; }
  .stampmaker-online-stamp-editor #editor-page.smo-friendly-editor #plate-size-btn { flex-direction: row; flex-wrap: wrap; gap: 3px 5px; }
  .smo-friendly-editor #plate-size-btn .smo-tool-caption { max-width: 68px; font-size: 10px; }
  .smo-friendly-editor #plate-size-btn small { width: 100%; font-size: 9px; }
  .smo-friendly-editor #text-positions-btn.active::after { position: absolute; top: 3px; inset-inline-end: 5px; font-size: 10px; }
  .smo-friendly-editor #text-positions-btn { position: relative; }
  .smo-friendly-editor .smo-view-menu { width: 100%; }
}
