/**
 * "Info Icoon" block: a small "i" button that opens a click/tap popover
 * with admin-typed text (native HTML Popover API, positioned via
 * info-init.js so it appears next to the icon instead of screen-centered).
 */
.img-info-icoon {
    display: inline-flex;
    vertical-align: middle;
}

.img-info-icon,
.img-info-icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 999px;
    background: var(--wp--preset--color--tertiary, #f3f3f3);
    color: inherit;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.img-info-icon:hover,
.img-info-icon:focus-visible,
.img-info-icon-inline:hover,
.img-info-icon-inline:focus-visible {
    background: var(--wp--preset--color--border-light, #e3e3e3);
    outline: none;
}

/* Inline variant (via the "Info Icoon" text-format, usable inside any
   heading/paragraph/list item/etc., right next to existing text) - same
   look as the standalone block's icon, plus a little breathing room from
   the preceding text. */
.img-info-icon-inline {
    margin-left: 6px;
    vertical-align: middle;
}

/* In the editor, an inline-format marker's actual "content" is an invisible
   object-replacement character (not the literal letter "i"), so without
   this it would look empty while editing. Scoped to the editor's own
   canvas classes only - never matches on the front-end, where
   info-render.php / img_render_inline_info_icons() always output a real
   "i" as text already. */
.block-editor-rich-text__editable .img-info-icon-inline,
.editor-styles-wrapper .img-info-icon-inline {
    font-size: 0;
}

.block-editor-rich-text__editable .img-info-icon-inline::after,
.editor-styles-wrapper .img-info-icon-inline::after {
    content: 'i';
    font-size: 12px;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 700;
}

.img-info-popover {
    position: fixed; /* top/left set by info-init.js so it sits next to its icon */
    margin: 0;
    max-width: 280px;
    padding: 10px 14px;
    border: 1px solid var(--wp--preset--color--border-light, #e3e3e3);
    border-radius: 6px;
    background: var(--wp--preset--color--base, #fff);
    color: var(--wp--preset--color--contrast, #1a1a1a);
    font-family: var(--wp--preset--font-family--body, sans-serif);
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
