/* Page editing controls inside the existing program account. */
.pwe-editor { margin-top:24px; }
.pwe-editor [hidden] { display:none!important; }
.pwe-editor fieldset { border:0; padding:0; margin:0; min-width:0; }
.pwe-editor .pwe-page-picker { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:14px; margin:18px 0 28px; }
.pwe-page-picker>.btn { margin-bottom:14px; }
.pwe-field { margin-bottom:14px; min-width:0; }
.pwe-field label,.pwe-photo>label { display:block; font-size:13px; font-weight:600; margin-bottom:6px; }
.pwe-field input,.pwe-field select,.pwe-field textarea { box-sizing:border-box; width:100%; }
.pwe-field input[readonly] { background:#f4f1ee; color:#635b56; }
.pwe-field textarea { min-height:130px; resize:vertical; font:inherit; line-height:1.6; }
.pwe-hint { font-size:12px; line-height:1.55; color:#6b645e; margin:9px 0 14px; }
.pwe-visibility-hint { padding:12px 14px; border-left:3px solid #a49b8e; background:#f6f3ee; border-radius:3px; }
.pwe-preview-link { display:inline-block; font-size:13px; margin:0 0 18px; }
.pwe-photo { padding:18px; border:1px solid #e1dbd5; background:#faf8f5; border-radius:8px; margin:0 0 22px; }
.pwe-photo-preview { display:block; max-width:100%; width:auto; height:auto; max-height:260px; object-fit:contain; margin:10px 0 16px; border-radius:5px; }
.pwe-photo input[type=file] { max-width:100%; font-size:13px; }
.pwe-inline-actions,.pwe-add-sections { display:flex; flex-wrap:wrap; align-items:center; gap:9px; }
.pwe-page-fields>h4 { font-size:16px; margin:25px 0 14px; }
.pwe-section { border:1px solid #d8d0c8; border-radius:9px; margin:0 0 15px; overflow:hidden; }
.pwe-section-toolbar { display:flex; align-items:center; gap:7px; padding:10px 14px; background:#f6f2ed; border-bottom:1px solid #e6ded6; }
.pwe-section-kind { font-size:12px; font-weight:600; margin-right:auto; }
.pwe-section-toolbar .btn { margin:0; padding:5px 9px; min-height:30px; font-size:12px; }
.pwe-section>details>summary { padding:16px 18px; cursor:pointer; font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.pwe-section-fields { padding:2px 18px 18px; }
.pwe-section-fields .pwe-photo { margin-top:18px; }
.pwe-links { border-top:1px solid #e4ddd7; margin-top:16px; padding-top:12px; }
.pwe-links>summary { font-size:12px; cursor:pointer; padding-bottom:12px; }
.pwe-link-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.7fr) auto; align-items:end; gap:9px; }
.pwe-link-row>.btn { margin-bottom:14px; }
.pwe-add-sections { margin:20px 0; padding:18px 0; border-top:1px solid #e0d8d0; }
.pwe-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; position:sticky; bottom:0; background:#fff; padding:15px 0 4px; z-index:2; }
.pwe-new-page { padding:20px; background:#faf8f5; border:1px solid #e0d8d0; border-radius:8px; }
.pwe-new-page h4 { margin:0 0 20px; font-size:17px; }
@media(max-width:600px) {
 .pwe-editor .pwe-page-picker { grid-template-columns:1fr; gap:0; }
 .pwe-page-picker>.btn { justify-self:start; margin-bottom:8px; }
 .pwe-section-toolbar { flex-wrap:wrap; }
 .pwe-section-kind { flex-basis:100%; margin-bottom:2px; }
 .pwe-link-row { grid-template-columns:1fr; gap:0; }
 .pwe-link-row>.btn { justify-self:start; }
 .pwe-section-fields { padding-left:13px; padding-right:13px; }
 .pwe-photo { padding:13px; }
}
