/* «טשטוש פנים» — shared face blur tool (static/js/face-blur/face-blur.js). Design: /workspace/shared/face-blur-tool (Daisy, Racheli t1082u). */
.fb-pill:not(#fbz) { --fb-pink: #dd5b76; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 11px; border-radius: 999px;
    border: 0; background: rgba(255,255,255,.96); color: var(--fb-pink); font: 700 13px/1 Heebo, inherit; cursor: pointer; white-space: nowrap;
    box-shadow: 0 4px 14px -4px rgba(44,62,80,.35); direction: rtl; -webkit-tap-highlight-color: transparent; }
.fb-pill .fb-ico { width: 16px; height: 16px; flex: 0 0 16px; }
.fb-pill.is-on:not(#fbz) { background: var(--fb-pink); color: #fff; }
.fb-pill:focus-visible { outline: 2px solid #2c3e50; outline-offset: 2px; }
.fb-pill-onimg { position: absolute; right: 12px; bottom: 12px; z-index: 4; }
/* 390: beside the photos row, outlined */
.fb-pill-row:not(#fbz) { height: 34px; border: 1.5px solid #dd5b76; background: #fff; box-shadow: none; }
.fb-pill-row.is-on:not(#fbz) { background: #dd5b76; color: #fff; }
.fb-badge { position: absolute; top: 3px; left: 3px; z-index: 3; width: 16px; height: 16px; border-radius: 50%; background: #fff; color: #dd5b76;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(44,62,80,.3); pointer-events: none; }
.fb-badge .fb-ico { width: 12px; height: 12px; }

.fb-host { position: relative !important; }
.fb-ed { position: absolute; inset: 0; z-index: 30; background: #fff; display: flex; flex-direction: column; direction: rtl; text-align: right; color: #2c3e50;
    font-family: Heebo, inherit; border-radius: inherit; }
.fb-ed *, .fb-ed *::before, .fb-ed *::after { box-sizing: border-box; }
.fb-ed-in { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; height: 100%; }
.fb-ed-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: grid; gap: 10px 18px;
    grid-template-columns: minmax(0, 1fr) 276px; grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas: "stage head" "stage faces" "stage add" "stage rest"; }
.fb-ed-head { grid-area: head; }
.fb-ed-head h4 { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: #2c3e50; }
.fb-ed-msg { margin: 0; font-size: 13px; line-height: 1.5; color: #7b8794; }
.fb-ed-stage { grid-area: stage; position: relative; min-height: 0; min-width: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.fb-ed-pic { position: relative; width: 0; height: 0; border-radius: 14px; overflow: hidden; touch-action: none; background: #f3eeea; }
.fb-ed-cv, .fb-ed-ink { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fb-ed-ink { pointer-events: none; }
.fb-ed-rings { position: absolute; inset: 0; pointer-events: none; }
.fb-ring:not(#fbz) { position: absolute; border-radius: 50%; border: 2px dashed #fff; box-shadow: 0 0 0 1.5px #dd5b76, inset 0 0 0 1px rgba(221,91,118,.6);
    background: transparent; padding: 0; cursor: pointer; pointer-events: auto; }
.fb-ring i { position: absolute; top: 4%; right: 4%; width: 22px; height: 22px; border-radius: 50%; background: #dd5b76; color: #fff; border: 2px solid #fff;
    font: 800 11px/18px Heebo, inherit; font-style: normal; text-align: center; transform: translate(30%, -30%); }
.fb-ring.is-off { border-color: rgba(255,255,255,.85); box-shadow: 0 0 0 1.5px rgba(123,135,148,.8); }
.fb-ring.is-off i { background: #7b8794; }
.fb-brushing .fb-ring { pointer-events: none; }
.fb-brushing .fb-ed-pic { cursor: crosshair; outline: 2px solid #dd5b76; outline-offset: -2px; }
.fb-ed-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 700; color: #2c3e50; background: rgba(252,250,247,.9); }
.fb-ed.is-ready .fb-ed-wait { display: none; }
.fb-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #f3d3da; border-top-color: #dd5b76; animation: fbspin .8s linear infinite; }
@keyframes fbspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fb-spin { animation: none; } }
.fb-ed-faces { grid-area: faces; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.fb-face { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 10px; border: 1px solid #f3d3da; border-radius: 14px; background: #fff; }
.fb-face[hidden], .fb-more[hidden] { display: none; }
.fb-face-img { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; overflow: hidden; background: #f3eeea; }
.fb-face-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-face-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fb-face-txt b { font-size: 14px; font-weight: 800; }
.fb-face-txt small { font-size: 12px; color: #7b8794; }
.fb-switch:not(#fbz) { flex: 0 0 42px; width: 42px; height: 24px; border-radius: 999px; border: 0; padding: 0; background: #dd5b76; position: relative; cursor: pointer; }
.fb-switch:focus-visible { outline: 2px solid #2c3e50; outline-offset: 2px; }
.fb-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #dd5b76; display: flex; align-items: center; justify-content: center; transition: left .15s; }
.fb-face.is-off .fb-switch:not(#fbz) { background: #d5d9de; }
.fb-face.is-off .fb-knob { left: 21px; color: transparent; }
.fb-more { font-size: 12px; color: #7b8794; padding: 6px 10px; border: 1px dashed #f3d3da; border-radius: 12px; }
.fb-ed-add { grid-area: add; display: block; padding: 10px 12px; border: 1.5px dashed #ecb3c0; background: #fff8f9; border-radius: 14px; cursor: pointer; }
.fb-ed-add b { display: block; color: #dd5b76; font-size: 14px; font-weight: 800; }
.fb-ed-add small { display: block; color: #7b8794; font-size: 12px; margin-top: 2px; }
.fb-ed-add:focus-visible { outline: 2px solid #2c3e50; outline-offset: 2px; }
.fb-ed-tools { display: none; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fb-brushing .fb-ed-add { border-style: solid; border-color: #dd5b76; }
.fb-brushing .fb-ed-tools { display: flex; }
.fb-ed-tools button:not(#fbz) { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid #f3d3da; background: #fff; color: #2c3e50; font: 700 12px Heebo, inherit; cursor: pointer; }
.fb-ed-tools button.is-on:not(#fbz) { background: #dd5b76; border-color: #dd5b76; color: #fff; }
.fb-ed-tools [data-undo] { margin-inline-start: auto; }
.fb-ed-acts { flex: 0 0 auto; }
.fb-ed.is-noimg .fb-ed-add, .fb-ed.is-noimg .fb-ed-stage { visibility: hidden; }
/* own buttons (standalone editor) */
.fb-acts { display: flex; gap: 12px; margin-top: 14px; }
.fb-acts button:not(#fbz) { flex: 1; height: 48px; border-radius: 14px; font: 800 15px Heebo, inherit; cursor: pointer; }
.fb-btn-pink:not(#fbz) { border: 0; background: #dd5b76; color: #fff; box-shadow: 0 10px 22px -10px rgba(221,91,118,.8); }
.fb-btn-outline:not(#fbz) { border: 1px solid #f3d3da; background: #fff; color: #2c3e50; }
/* narrow windows (390): title, picture, faces, add — no inner scroll; the picture shrinks first */
.fb-ed.fb-narrow .fb-ed-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; align-content: start;
    grid-template-areas: "head" "stage" "faces" "add"; gap: 8px; }
.fb-ed.fb-narrow .fb-face { height: 50px; }
.fb-ed.fb-narrow .fb-ed-add { padding: 8px 12px; }
/* standalone editor (photo inputs on the other pages) */
html.fb-modal-open, html.fb-modal-open body { overflow: hidden; }
.fb-modal { position: fixed; inset: 0; z-index: 2147483000; background: rgba(44,35,38,.45); display: flex; align-items: center; justify-content: center; padding: 12px; }
.fb-modal-box { position: relative; width: 860px; height: 600px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); background: #fff; border-radius: 20px; box-shadow: 0 30px 80px -24px rgba(43,35,38,.42); }
.fb-ed-standalone { padding: 22px 24px 20px; }
@media (max-width: 767px) {
    .fb-modal-box { width: 728px; }
}
@media (max-width: 600px) {
    .fb-modal { padding: 0; align-items: flex-end; }
    .fb-modal-box { width: 100vw; max-width: 100vw; height: calc(100vh - 68px); height: calc(100dvh - 68px); max-height: none; border-radius: 22px 22px 0 0; }
    .fb-ed-standalone { padding: 16px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- per-window placement (hooks in personal_area templates) ---- */
#pa-rec .fb-pill-row { display: none; }
#pa-rec .pa-rec-mainimg .fb-pill-onimg { z-index: 5; }
@media (max-width: 600px) {
    #pa-rec .pa-hint .fb-pill-row { display: flex; height: 30px; margin: 0 0 4px; font-size: 12.5px; }
    #pa-rec .pa-rec-mainimg .fb-pill-onimg { display: none; }
}
#pa-up .ph { position: relative; }
#pa-up .fb-pill-row { display: none; }
@media (max-width: 767px) {
    #pa-up .phs .fb-pill-row { display: inline-flex; grid-column: 1 / -1; justify-self: start; height: 30px; }
    #pa-up .ph.main .fb-pill-onimg { display: none; }
}
/* 1366/1024/768: a smaller pill in the bottom-right corner, clear of the ✓ on the left */
@media (min-width: 768px) {
    #pa-up .ph.main .fb-pill-onimg { height: 26px; padding: 0 9px 0 8px; font-size: 12px; gap: 4px; right: 8px; left: auto; bottom: 8px; max-width: calc(100% - 40px); }
    #pa-up .ph.main .fb-pill-onimg .fb-ico { width: 14px; height: 14px; flex: 0 0 14px; }
    #pa-up .ph.main .pai ~ .fb-pill-onimg { bottom: 42px; }   /* above «שיפור תמונה עם AI» when that button is on */
    /* a little room between the crop/delete icons and the «ראשית» tag: the tag sits under the star */
    #pa-up .ph.main .pmain { top: 42px; right: 8px; }
}
/* while the editor is open in the item window, its own «שמירה/ביטול» replace the step's «חזרה/המשך» row */
#pa-up .pa-up-step[data-step="2"]:has(.fb-ed) .ftr { display: none; }
#pa-up .pa-up-step[data-step="2"] .mb { position: relative; }

/* «העלאת תמונה לסט»: the button gets its own row under the filename, right-aligned, so the hint stays on one line */
#pa-sp .pa-sp-drop.has-file .pa-sp-drop-full {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "img txt" "img btn";
    align-items: center;
    justify-items: start;
    column-gap: 12px;
    row-gap: 6px;
}
#pa-sp .pa-sp-drop-full .pa-micro-preview-wrap { grid-area: img; position: relative; }
#pa-sp .pa-sp-drop-full > span:not(.pa-micro-preview-wrap) { grid-area: txt; min-width: 0; }
#pa-sp .pa-sp-drop-full .fb-pill { grid-area: btn; justify-self: right; margin: 0; flex: none; display: inline-flex; flex-direction: row; }
#pa-sp .pa-sp-drop-full .fb-pill span { display: inline; }
#pa-sp .fb-pill-sp { border: 1.5px solid #dd5b76; box-shadow: none; }
#pa-sp .fb-ed { border-radius: 0 0 20px 20px; }
#pa-sp .fb-in-sp .fb-ed-body { padding: 14px 20px 10px; }
@media (max-width: 600px) { #pa-sp .fb-in-sp .fb-ed-body { padding: 12px 16px 8px; } }
.fb-ed:focus { outline: none; }

/* «פריט חדש ללוח» at 390: the main thumb was ~80px and the star/crop/trash sat on top of each other.
   Daisy 2.12 02:31: thumb at least 96px, 22px icons in the corners with a gap, and «ראשית» shown as on 1366. */
@media (max-width: 767px) {
    #pa-up #pa-up-photos {
        grid-template-columns: minmax(96px, 110px) repeat(4, minmax(0, 1fr)) !important;
        gap: 6px;
        align-items: start;
    }
    #pa-up #pa-up-main.ph.main {
        min-width: 96px;
        min-height: 96px;
        max-height: none;
        aspect-ratio: 1;
    }
    #pa-up #pa-up-main .pst,
    #pa-up #pa-up-main .ptools span {
        width: 22px !important;
        height: 22px !important;
    }
    #pa-up #pa-up-main .pst .ico,
    #pa-up #pa-up-main .ptools .ico {
        width: 12px !important;
        height: 12px !important;
    }
    #pa-up #pa-up-main .pst { top: 4px; right: 4px; }
    /* crop at the top-left, trash at the bottom-right; the ✓ stays at the bottom-left */
    #pa-up #pa-up-main .ptools {
        inset: 4px;
        width: auto;
        height: auto;
        gap: 0;
        pointer-events: none;
    }
    #pa-up #pa-up-main .ptools span { pointer-events: auto; position: absolute; }
    #pa-up #pa-up-main .ptools span:first-child { top: 0; left: 0; }
    #pa-up #pa-up-main .ptools [data-ph-del] { top: auto; left: auto; bottom: 0; right: 0; }
    #pa-up #pa-up-main .pmain {
        display: block !important;
        top: 30px;
        right: 4px;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 6px;
        white-space: nowrap;
    }
    #pa-up #pa-up-main.pa-up-empty { min-height: 78px; aspect-ratio: auto; }
}
