/* Edit-mode demo UI. Deliberately neutral so it works on top of every design direction. */
.br-edit-root {
  --br-accent: rgb(0, 177, 197);
  --br-accent-d: rgb(0, 140, 158);
  --br-ink: #14181b;
  --br-mute: #66707a;
  --br-line: #e3e7ea;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--br-ink);
}
.br-edit-root *, .br-edit-root *::before { box-sizing: border-box; }
.br-edit-root [hidden] { display: none !important; }

.br-demo-toggle {
  position: fixed; left: 16px; bottom: 16px; z-index: 9990;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--br-ink); color: #fff; font: 600 13px system-ui, sans-serif;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.br-demo-toggle svg { color: var(--br-accent); }
.br-demo-toggle:hover { background: #000; }

.br-adminbar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9990;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 14px; background: var(--br-ink); color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.br-adminbar .br-muted { color: #9aa4ad; }
.br-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; }
.br-switch { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.br-switch input { accent-color: var(--br-accent); }
.br-link { background: none; border: 0; color: var(--br-accent); cursor: pointer; font: inherit; text-decoration: underline; }

[data-edit] { transition: outline-color .15s; outline: 2px dashed transparent; outline-offset: 4px; }
body.br-editing [data-edit].br-hover { outline-color: rgb(0, 177, 197); cursor: default; }

.br-pencil {
  position: fixed; z-index: 9980; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid #fff; cursor: pointer;
  background: var(--br-accent); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.3);
  transition: transform .12s;
}
.br-pencil:hover { transform: scale(1.12); background: var(--br-accent-d); }

.br-modal-wrap {
  position: fixed; inset: 0; z-index: 9995; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 14, 16, .55); backdrop-filter: blur(3px);
}
.br-modal {
  width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden;
}
.br-modal.br-wide { width: min(860px, 100%); }
.br-modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--br-line); }
.br-modal h3 { margin: 0; font-size: 17px; font-weight: 700; }
.br-x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--br-mute); }
.br-body { padding: 18px 20px; overflow: auto; }
.br-modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--br-line); background: #fafbfc; }
.br-modal footer:empty { display: none; }

.br-body label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 13px; }
.br-body input:not([type=checkbox]):not([type=file]), .br-body textarea, .br-body select {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid #cfd6db; border-radius: 9px;
  font: 400 14px/1.45 system-ui, sans-serif; color: var(--br-ink); background: #fff;
}
.br-body textarea { resize: vertical; }
.br-body input:focus, .br-body textarea:focus, .br-body select:focus { outline: 2px solid var(--br-accent); outline-offset: 0; border-color: transparent; }
.br-body input[readonly] { background: #f3f5f6; }
.br-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.br-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .br-split, .br-row { grid-template-columns: 1fr; } }
.br-muted { color: var(--br-mute); font-size: 13px; }
.br-label { font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
.br-note { padding: 12px; border-radius: 10px; background: #e8f8fa; color: #0d5560; }

.br-btn { border: 0; border-radius: 9px; padding: 9px 16px; cursor: pointer; font: 600 14px system-ui, sans-serif; background: var(--br-accent); color: #fff; }
.br-btn:hover { background: var(--br-accent-d); }
.br-btn.br-ghost { background: #fff; color: var(--br-ink); border: 1px solid #cfd6db; }
.br-btn.br-ghost:hover { background: #f3f5f6; }
.br-btn.br-sm { padding: 5px 10px; font-size: 13px; }

.br-toolbar { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.br-toolbar button { border: 1px solid #cfd6db; background: #fff; border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.br-toolbar .br-muted { margin-left: auto; }

.br-imgpick-current { position: relative; border-radius: 10px; overflow: hidden; background: #eef1f3; aspect-ratio: 16/9; }
.br-imgpick-current img { width: 100%; height: 100%; object-fit: cover; display: block; }
.br-imgpick-current span { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; }
.br-drop { display: flex !important; flex-direction: column; align-items: center; gap: 2px; margin: 10px 0 0 !important; padding: 14px; border: 2px dashed #b9c3ca; border-radius: 10px; cursor: pointer; text-align: center; }
.br-drop:hover { border-color: var(--br-accent); background: #f2fbfc; }
.br-drop span { font-weight: 400; color: var(--br-mute); }
.br-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.br-lib button { padding: 0; border: 3px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: #eee; }
.br-lib button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.br-lib button.on { border-color: var(--br-accent); }
.br-lib-posts button:not(.on) { opacity: .35; }

.br-hrow { display: grid; grid-template-columns: 130px 1fr auto 1fr 70px; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--br-line); }
.br-hrow input[type=time] { margin: 0 !important; padding: 6px 8px !important; }
.br-hrow input[type=time]:disabled { opacity: .35; }
.br-hrow em { color: var(--br-mute); font-size: 12px; }
.br-check { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; cursor: pointer; }
.br-check input { accent-color: var(--br-accent); width: 16px; height: 16px; }

.br-list { list-style: none; margin: 0 0 14px; padding: 0; }
.br-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--br-line); border-radius: 10px; margin-bottom: 6px; }
.br-list li img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.br-list li div { flex: 1; display: flex; flex-direction: column; }
.br-list li small { color: var(--br-mute); }
.br-grip { color: #b0b8be; cursor: grab; letter-spacing: -3px; }

.br-connect { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--br-line); border-radius: 10px; margin-bottom: 8px; }
.br-connect div { flex: 1; display: flex; flex-direction: column; }
.br-connect small { color: var(--br-mute); }
.br-ig, .br-fb { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.br-ig { background: linear-gradient(45deg, #f9a825, #e91e63, #7b1fa2); font-size: 12px; }
.br-fb { background: #1877f2; font-size: 18px; }
.br-ok { color: #1a9d55; font-weight: 800; }

.br-toast {
  position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 9999;
  padding: 10px 18px; border-radius: 999px; background: var(--br-ink); color: #fff; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* crop / focus editor */
.br-split-crop { grid-template-columns: 1.15fr 1fr; }
@media (max-width: 640px) { .br-split-crop { grid-template-columns: 1fr; } }
.br-crop-row { display: flex; gap: 12px; align-items: flex-end; }
.br-crop-col { display: flex; flex-direction: column; gap: 4px; }
.br-crop-col small { color: var(--br-mute); font-size: 12px; text-align: center; }
.br-crop-main { flex: 1; min-width: 0; }
.br-crop-phone { width: 26%; flex: none; }
.br-frame { position: relative; overflow: hidden; border-radius: 10px; background: #eef1f3; cursor: grab; touch-action: none; }
.br-crop-phone .br-frame { border-radius: 14px; outline: 3px solid var(--br-ink); }
.br-frame img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; pointer-events: none; }
.br-frame.br-dragging { cursor: grabbing; }
.br-grid { position: absolute; inset: 0; opacity: 0; transition: opacity .15s; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.7) 33.33%, transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.7) 66.66%, transparent calc(66.66% + .5px)),
              linear-gradient(transparent calc(33.33% - .5px), rgba(255,255,255,.7) 33.33%, transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.7) 66.66%, transparent calc(66.66% + .5px)); }
.br-dragging .br-grid, .br-frame:hover .br-grid { opacity: 1; }
.br-zoom { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--br-mute); font-weight: 700; }
.br-zoom input { flex: 1; accent-color: var(--br-accent); }

/* "+ Platenbaas toevoegen" card, only in edit mode */
.br-add-card { display: none; }
body.br-editing .br-add-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 260px; padding: 24px; border-radius: 24px; cursor: pointer;
  border: 2px dashed rgb(0, 177, 197); background: rgba(0, 177, 197, .06); color: rgb(0, 120, 138);
  font: 600 15px system-ui, sans-serif; text-align: center; transition: background .15s;
}
body.br-editing .br-add-card:hover { background: rgba(0, 177, 197, .14); }
.br-add-card span { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgb(0, 177, 197); color: #fff; font-size: 30px; font-weight: 400; margin-bottom: 8px; }
.br-add-card small { font-weight: 400; opacity: .75; }
@media (max-width: 639px) { body.br-editing .br-add-card { flex: 0 0 80%; } }

/* touch: always-visible pencils */
.br-pin {
  position: absolute; top: 8px; right: 8px; z-index: 30;
  width: 36px; height: 36px; border-radius: 999px; border: 2px solid #fff;
  display: grid; place-items: center; cursor: pointer;
  background: rgb(0, 177, 197); color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.br-pin.br-pin-left { right: auto; left: 8px; }
.br-pin.br-pin-corner { top: -16px; right: -10px; width: 32px; height: 32px; }
.br-pin.br-pin-label { position: static; width: auto; height: 38px; margin: 0 0 12px auto; padding: 0 16px 0 12px; display: flex; gap: 6px; font: 600 13px system-ui, sans-serif; }
body.br-editing [data-edit] { outline: 2px dashed transparent; }
@media (hover: none) { body.br-editing [data-edit] { outline-color: rgba(0, 177, 197, .45); } }

/* reorder list */
.br-list li[draggable] { background: #fff; }
.br-list li.br-drag-src { opacity: .4; }
.br-list li.br-drop-target { border-color: rgb(0, 177, 197); box-shadow: 0 -3px 0 rgb(0, 177, 197); }
.br-arrows { display: flex; flex-direction: column; gap: 2px; }
.br-arrows button { width: 26px; height: 18px; line-height: 1; border: 1px solid #cfd6db; border-radius: 5px; background: #fff; cursor: pointer; font-size: 11px; padding: 0; }
.br-arrows button:disabled { opacity: .3; cursor: default; }
.br-list li img { object-fit: cover; }

/* platenbaas form */
.br-fav { display: flex; gap: 12px; align-items: flex-start; }
.br-fav-cover { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: #eef1f3; display: grid; place-items: center; font-size: 24px; color: var(--br-mute); }
.br-fav-cover img { width: 100%; height: 100%; object-fit: cover; }
.br-lib-sm { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); margin-top: 10px; }
.br-card-cap { display: flex; flex-direction: column; gap: 1px; padding: 8px 2px 0; }
.br-card-cap b { font-size: 16px; }
.br-card-cap small { color: rgb(0, 120, 138); font-weight: 600; font-size: 12px; text-align: left; }
.br-card-cap .br-muted { font-size: 11px; margin-top: 4px; }
