/* Scoped to Green Basket document forms; existing site and panel styles stay intact. */
.gb-editor-source[hidden], .gb-document-editor [hidden] { display: none !important; }
.gb-document-editor { min-width: 0; text-align: left; }
.gb-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.gb-editor-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; padding: 12px; border: 1px solid var(--line, #454a4e); border-radius: 16px 16px 0 0; background: #1b2023; }
.gb-document-editor .gb-editor-toolbar button, .gb-document-editor .gb-editor-heading button, .gb-document-editor .gb-editor-panel button { font-size: 14px; padding: 9px 12px; min-height: 40px; width: auto; }
.gb-document-editor .gb-editor-toolbar label { width: auto; margin: 0; font-size: 12px; gap: 4px; }
.gb-document-editor .gb-editor-toolbar select { min-width: 0; width: 180px; max-width: 100%; padding: 9px; font-size: 14px; }
.gb-editor-panel { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 14px; border: 1px solid var(--line, #454a4e); }
.gb-editor-panel label { flex: 1 1 220px; min-width: 0; }
.gb-editor-panel p { width: 100%; margin: 0; font-size: 13px; }
.gb-editor-surface, .gb-editor-page { padding: 20px; color: #2d2d2d; background: #fff3df; font: 17px/1.55 Arial, sans-serif; overflow-wrap: anywhere; text-align: left; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) * { color: inherit; text-align: inherit; }
.gb-editor-surface { min-height: 320px; max-height: 65vh; overflow: auto; border: 2px solid transparent; border-radius: 0 0 16px 16px; outline: none; }
.gb-editor-surface:focus { border-color: var(--accent, #d8ab42); }
.gb-editor-preview { margin-top: 16px; }
.gb-editor-page { margin-top: 8px; max-height: 65vh; overflow: auto; border-radius: 16px; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) :is(img, table) { max-width: 100%; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) img { height: auto; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) a { color: #31543b; text-decoration: underline; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) :is(h2,h3,h4) { color: inherit; margin: 20px 0 10px; line-height: 1.25; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) h2 { font-size: 24px; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) h3 { font-size: 20px; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) :is(p,ul,ol,dl) { margin: 0 0 12px; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) :is(ul,ol) { padding-left: 24px; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) dd { margin: 0 0 10px; font-size: inherit; }
.gb-document-editor :is(.gb-editor-surface, .gb-editor-page) .document-image { display: block; width: 100%; margin: 16px 0; border-radius: 12px; }
.gb-editor-message, .gb-editor-hint { font-size: 13px; line-height: 1.45; margin: 10px 0 0; }
.gb-editor-message:empty { display: none; }
@media (max-width: 480px) { .gb-editor-surface, .gb-editor-page { padding: 14px; font-size: 16px; } .gb-editor-toolbar { gap: 6px; padding: 8px; } }
