﻿/* =========================
   INPUT ORIGINAL (model binding / validação)
   ========================= */
.rt-source {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* =========================
   WRAPPER DO EDITOR (seu “textarea visual”)
   ========================= */
.rt-wrap {
    width: 100%;
    max-width: 410px;
    min-height: 50px;
    resize: vertical;
    overflow: auto; /* necessário pro resize */

    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
    box-sizing: border-box;
    position: relative;
}

    /* o Quill ocupa a altura do wrapper */
    .rt-wrap .ql-container {
        height: 100%;
        box-sizing: border-box;
    }

    /* padding interno zero pra “parecer textarea” */
    .rt-wrap .ql-editor {
        padding: 0;
        box-sizing: border-box;
    }
    .rt-wrap.form-control.text-box.multi-line {
        height: auto; /* cancela o 34px do bootstrap */
        min-height: 50px; /* mínimo */
    }

    /* TextBoxFor habilitado (single-line) */
    .rt-wrap.rt-single {
        min-height: 36px !important;
        resize: none;
        padding: 6px 8px;
    }

        .rt-wrap.rt-single .ql-editor {
            min-height: 24px;
            padding: 0;
        }

/* =========================
   HOST GLOBAL DO BUBBLE (portal)
   ========================= */
#quill-bubble-host {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 999999;
    pointer-events: none;
}

    #quill-bubble-host .rt-bubble-shell {
        position: fixed;
        left: 0;
        top: 0;
        pointer-events: none;
    }

        /* Default: escondido (pra não acumular) */
        #quill-bubble-host .rt-bubble-shell .ql-tooltip {
            display: none !important;
            pointer-events: auto;
            white-space: nowrap;
            background: #111 !important;
            color: #fff !important;
            border: 0 !important;
            border-radius: 10px !important;
            padding: 8px 10px !important;
            box-shadow: 0 8px 24px rgba(0,0,0,.25) !important;

            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            transform: none !important;
            margin: 0 !important;
            pointer-events: auto;
        }

        /* Visível somente quando JS colocar .rt-visible */
        #quill-bubble-host .rt-bubble-shell.rt-visible .ql-tooltip {
            display: inline-block !important;
            width: max-content !important;
        }

        /* Sem setinha */
        #quill-bubble-host .rt-bubble-shell .ql-tooltip .ql-tooltip-arrow {
            display: none !important;
        }

        /* Toolbar horizontal */
        #quill-bubble-host .rt-bubble-shell .ql-tooltip .ql-toolbar {
            display: flex !important;
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            align-items: center !important;
            gap: 6px !important;
            padding: 0 !important;
            margin: 0 !important;
        }

        #quill-bubble-host .rt-bubble-shell .ql-tooltip .ql-formats {
            display: inline-flex !important;
            margin: 0 8px 0 0 !important;
            gap: 6px !important;
        }

        /* Botões */
        #quill-bubble-host .rt-bubble-shell .ql-tooltip button,
        #quill-bubble-host .rt-bubble-shell .ql-tooltip .ql-picker {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            color: #fff !important;
            opacity: .92;
            background: transparent !important;
            border: 0 !important;
        }

            #quill-bubble-host .rt-bubble-shell .ql-tooltip button:hover {
                opacity: 1;
            }

        /* Ícones claros */
        #quill-bubble-host .rt-bubble-shell .ql-tooltip .ql-stroke {
            stroke: #fff !important;
        }

        #quill-bubble-host .rt-bubble-shell .ql-tooltip .ql-fill {
            fill: #fff !important;
        }
