/* =========================
   EDIT BTN
   ========================= */
.edit-btn:hover[b-ybfaqcyilv] {
    background: rgba(255,255,255,1);
}

.edit-btn[b-ybfaqcyilv] {
    position: absolute; /* !!! */
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: background .2s ease;
    z-index: 2;
    flex: 0 0 auto;
}


    .edit-btn svg[b-ybfaqcyilv] {
        width: 16px;
        height: 16px;
        fill: var(--Editable_image_edit_button_svg_fill_color);
    }

    .edit-btn:hover svg[b-ybfaqcyilv] {
        fill: var(--Editable_image_edit_button_svg_fill_color_hover);
    }

/* =========================
   MODAL
   ========================= */
.modal-backdrop[b-ybfaqcyilv] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal[b-ybfaqcyilv] {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: min(90vw, 500px);
    max-width: 500px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    white-space: normal;
    text-align: left;
    line-height: normal;
    overflow-wrap: anywhere;
}

.modal-actions[b-ybfaqcyilv] {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.preview-frame[b-ybfaqcyilv] {
    width: min(100%, 200px);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 10px;
    border: 1px solid var(--Editable_image_preview_image_border_color);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
}

.preview-img[b-ybfaqcyilv] {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* =========================
   BTN
   ========================= */
.btn[b-ybfaqcyilv] {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background-color: var(--Editable_image_btn_background_color);
    color: var(--Editable_image_btn_text_color);
    cursor: pointer;
}

.modal label.btn[b-ybfaqcyilv] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    min-height: 0;
    line-height: normal;
    white-space: normal;
}

.modal h2[b-ybfaqcyilv],
.modal label[b-ybfaqcyilv],
.modal button[b-ybfaqcyilv] {
    white-space: normal;
}

/* =========================
   BUSY OVERLAY
   ========================= */
/* === Busy overlay === */
.busy-overlay[b-ybfaqcyilv] {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    touch-action: none;
}

.busy-card[b-ybfaqcyilv] {
    background: var(--Editable_image_busy_card_background_color);
    color: var(--Editable_image_busy_card_text-color);
    padding: 16px 20px;
    border-radius: 12px;
    min-width: 220px;
    max-width: 90vw;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.busy-message[b-ybfaqcyilv] {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.busy-spinner[b-ybfaqcyilv] {
    width: 32px;
    height: 32px;
    border: 3px solid var(--Editable_image_busy_spinner_border_color);
    border-top-color: var(--Editable_image_busy_spinner_border_top_color);
    border-radius: 50%;
    animation: busy-spin-b-ybfaqcyilv .8s linear infinite;
}

@keyframes busy-spin-b-ybfaqcyilv {
    to {
        transform: rotate(360deg);
    }
}

.busy-progress[b-ybfaqcyilv] {
    width: 100%;
    height: 6px;
    background: var(--Editable_image_busy_progress_background_color);
    border-radius: 999px;
    overflow: hidden;
}

.busy-progress-bar[b-ybfaqcyilv] {
    height: 100%;
    background: var(--Editable_image_busy_progress_bar_background_color);
    transition: width .15s ease;
}
