/*1.0 - GISHtmlEditor*/
.gis-htmleditor {
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
    width: 100%;
}

.gis-htmleditor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px;
    border-bottom: 1px solid #ccc;
    background-color: #f7f7f7;
}

.gis-htmleditor-select {
    height: 26px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
    font-size: 12px;
    margin-right: 4px;
}

.gis-htmleditor-button {
    position: relative;
    width: 28px;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 3px;
    background-color: transparent;
    color: #444;
    cursor: pointer;
    font-size: 13px;
}

    .gis-htmleditor-button:hover {
        background-color: #e6e6e6;
    }

    .gis-htmleditor-button.gis-htmleditor-button-active {
        background-color: var(--primary-color);
        color: #fff;
    }

.gis-htmleditor-separator {
    width: 1px;
    height: 20px;
    background-color: #ccc;
    margin: 0 4px;
}

.gis-htmleditor-colorwrap {
    position: relative;
    display: inline-flex;
}

/*palette colori: 6 colonne x 3 righe (tonalità chiara, media, scura)*/
.gis-htmleditor-palette {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(6, 20px);
    gap: 4px;
    padding: 6px;
    margin-top: 2px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.gis-htmleditor-swatch {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    padding: 0;
    cursor: pointer;
}

    .gis-htmleditor-swatch:hover {
        outline: 2px solid var(--primary-color);
        outline-offset: 1px;
    }

/*selettore libero del colore, occupa tutta la riga sotto gli swatch*/
.gis-htmleditor-palette-custom {
    grid-column: 1 / -1;
    width: 100%;
    height: 24px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    padding: 0;
    cursor: pointer;
    background-color: #fff;
}

.gis-htmleditor-content {
    padding: 10px;
    overflow: auto;
    outline: none;
    overflow-wrap: break-word;
}

    .gis-htmleditor-content:empty::before {
        content: attr(data-placeholder);
        color: #999;
        pointer-events: none;
    }

    .gis-htmleditor-content img {
        max-width: 100%;
    }

.gis-htmleditor-source {
    border: none;
    outline: none;
    resize: none;
    padding: 10px;
    font-family: Consolas, monospace;
    font-size: 12px;
    white-space: pre-wrap;
}
