/* The front-end "Edit" control the v2 engine draws for an admin (Theme_engine::edit_button():
   .ig-edit-btn, one link or a <details> menu of several). ONE copy for any theme that loads it
   (theme.json vendors); a theme sets only the colours:
     --ig-edit-bg, --ig-edit-fg, --ig-edit-hover, --ig-edit-accent (the pencil).
   Bottom-left, so it never covers a chat or back-to-top button on the right. Minimum text 14px. */
.ig-edit-btn { position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 79; font-family: inherit; }
.ig-edit-btn .ig-edit-btn__main { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px;
    background: var(--ig-edit-bg, #111827); color: var(--ig-edit-fg, #FFFFFF); font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1.2; text-decoration: none; cursor: pointer;
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); transition: transform .2s, background .2s; }
.ig-edit-btn .ig-edit-btn__main:hover, .ig-edit-btn .ig-edit-btn__main:focus-visible { transform: translateY(-2px); background: var(--ig-edit-hover, #374151); color: var(--ig-edit-fg, #FFFFFF); outline: none; }
/* the pencil, drawn here so the control does not depend on an icon font being on the page */
.ig-edit-btn .ig-edit-btn__main i { display: none; }
.ig-edit-btn .ig-edit-btn__main::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; background: var(--ig-edit-accent, currentColor);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E") center / 16px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E") center / 16px no-repeat; }
/* several edit targets: a menu that opens upward */
.ig-edit-btn--menu details { position: relative; }
.ig-edit-btn--menu summary { list-style: none; }
.ig-edit-btn--menu summary::-webkit-details-marker { display: none; }
.ig-edit-btn__list { position: absolute; left: 0; bottom: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: 14px; background: #FFFFFF;
    box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .45); display: grid; gap: 2px; }
.ig-edit-btn__list a { display: block; padding: 10px 12px; border-radius: 10px; color: #111827; font-size: 14px; font-weight: 600; text-decoration: none; }
.ig-edit-btn__list a:hover { background: #F3F4F6; color: #111827; }
@media (max-width: 640px) { .ig-edit-btn { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); } }
