/*! DimForge, plugin dimforgeAnchors (dimforge.anchors.js): ancore nell'area di scrittura e popup del plugin.
 *  Vale per DimForge (.df-element) e per Froala (.fr-view). Il popup usa le classi fr-*: con DimForge serve anche
 *  legacy/dimforge.legacy.css. Va caricato dopo lo stile del motore.
 */

/* Ancore nell'editor (.fr-view = Froala, .df-element = DimForge): segnalibro grigio,
   giallo al passaggio, blu se selezionato. Nella pagina pubblica l'<a name> resta vuoto e invisibile. */
.fr-view .fr-anchor,
.df-element .fr-anchor {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: sub;
    cursor: pointer;
    background-color: #333 !important;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 3h12a1 1 0 0 1 1 1v17l-7-3-7 3V4a1 1 0 0 1 1-1Z'/></svg>") no-repeat center/contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 3h12a1 1 0 0 1 1 1v17l-7-3-7 3V4a1 1 0 0 1 1-1Z'/></svg>") no-repeat center/contain;
}

.fr-view .fr-anchor:hover,
.df-element .fr-anchor:hover {
    background-color: #F6D146 !important;
}

.fr-view .fr-anchor.fr-active,
.df-element .fr-anchor.fr-active {
    background-color: #0098F7 !important;
}

@media print {
    .fr-view .fr-anchor,
    .df-element .fr-anchor {
        display: none;
    }
}

/* Popup "Insert Anchor" */
.kb-anchor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 0 16px;
}

.kb-anchor-layer.fr-active {
    width: 260px;
    margin: 0 16px 16px;
}

.kb-anchor-layer .fr-input-line {
    padding: 12px 0 0;
}

.kb-anchor-layer .kb-anchor-help {
    font-size: 12px;
    padding-bottom: 12px;
}

.kb-anchor-layer .kb-anchor-error {
    color: #f70000;
    border-color: #f70000 !important;
}

/* Popup di un'ancora: "#nome" con Edit e Delete */
.kb-anchor-edit {
    display: flex;
    align-items: center;
}

.kb-anchor-edit .kb-anchor-label {
    margin: 0 4px 0 10px;
    max-width: 12em;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0098F7;
    font-size: 14px;
    cursor: default;
    user-select: none;
}

/* Menu "Anchor Link" del popup dei link, senza ancore nell'articolo */
.kb-anchor-none {
    padding: 8px 16px;
    font-size: 13px;
    color: #888;
}
