/* Riverlight editor tweaks (self-hosted, loaded by index.html and demo/index.html).
   "Check for Preview": our setup has no deploy previews, so the button would only ever spin. Decap 3.17.3 shows it whenever a saved
   entry is open (show_preview_links: false does not hide it), so it is hidden here. The selector uses the component label Decap's
   build puts in its class names; cms/test/editor.py checks in a real browser that it is gone (re-run it after any Decap upgrade). */
html:not(.rlw-previews) [class*="-RefreshPreviewButton"] { display: none !important; }
html:not(.rlw-previews) [class*="-PreviewButtonContainer"]:has([class*="-RefreshPreviewButton"]) { display: none !important; }
/* With drafts and a preview project (pack-admin.mjs --previews), index.html gets class="rlw-previews" and the button stays visible. */

/* Plain message when a photo cannot be used (editor-tools.js) */
#rlw-photo-msg,#rlw-update-msg{position:fixed;left:50%;top:24px;transform:translateX(-50%);z-index:100000;max-width:560px;width:calc(100% - 32px);box-sizing:border-box;background:#fff4e5;color:#4a2b00;border:2px solid #d97706;border-radius:8px;padding:14px 16px;font:15px/1.45 system-ui,sans-serif;box-shadow:0 6px 24px rgba(0,0,0,.2)}
#rlw-photo-msg p,#rlw-update-msg p{margin:0 0 10px}
#rlw-photo-msg button,#rlw-update-msg button{font:inherit;padding:4px 16px;border-radius:6px;border:1px solid #d97706;background:#fff;cursor:pointer}
#rlw-update-msg{top:auto;bottom:24px;background:#e8f1ff;color:#0b2a55;border-color:#2563eb}
#rlw-preview-msg{position:fixed;right:16px;bottom:16px;z-index:99999;max-width:420px;box-sizing:border-box;background:#fdecec;color:#5a1010;border:2px solid #c62828;border-radius:8px;padding:10px 14px;font:14px/1.45 system-ui,sans-serif;box-shadow:0 6px 24px rgba(0,0,0,.2)}
#rlw-preview-msg p{margin:0}
#rlw-preview-msg.rlw-building{background:#eef4ff;color:#0b2a55;border-color:#2563eb}

/* r7d: Decap's own deploy-preview controls are never shown in the previews bundle; our #rlw-preview-btn replaces them */
html.rlw-previews [class*="-PreviewButtonContainer"], html.rlw-previews .rlw-native-hidden { display: none !important; }
#rlw-preview-btn{position:fixed;right:16px;bottom:16px;z-index:100000;font:600 14px/1.2 system-ui,sans-serif;padding:10px 16px;border-radius:8px;border:2px solid #2563eb;background:#2563eb;color:#fff;cursor:pointer;box-shadow:0 6px 24px rgba(0,0,0,.2)}
#rlw-preview-btn.rlw-disabled,#rlw-preview-btn:disabled{background:#e5e7eb;color:#6b7280;border-color:#d1d5db;cursor:not-allowed;opacity:.75;box-shadow:none}
#rlw-preview-msg{bottom:68px !important}
body.rlw-has-note #rlw-preview-btn{bottom:84px}
body.rlw-has-note #rlw-preview-msg{bottom:136px !important}

/* "Show this section" switch (rlw-show widget) */
.rlw-show{display:inline-flex;align-items:center;gap:.6rem;padding:10px 14px;cursor:pointer;font-size:15px}
.rlw-show input{appearance:none;-webkit-appearance:none;width:44px;height:24px;border-radius:12px;background:#cbd5e1;position:relative;margin:0;cursor:pointer;transition:background .15s}
.rlw-show input::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:left .15s}
.rlw-show input:checked{background:#2563eb}.rlw-show input:checked::after{left:23px}
.rlw-show input:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.rlw-show-off span{color:#b91c1c;font-weight:600}
