/* Estilos da extensao BlockHandle.
 *
 * design tokens (mantenha alinhado a paleta do app):
 *   --bh-color-icon:        slate-600 (#475569)  -> stroke padrao
 *   --bh-color-icon-hover:  slate-700 (#334155)  -> stroke hover
 *   --bh-bg-hover:          slate-100 (#eef2f7)
 *   --bh-bg-active:         slate-200 (#e2e8f0)
 *
 * posicionamento: ambos elementos sao filhos absolutos do parent do .ProseMirror
 * (set como position:relative pelo plugin). usamos `transform: translate3d`
 * pra mover entre blocos — GPU-accelerated, sem reflow.
 */

.bh-handle,
.bh-plus {
    /* JS escreve as coordenadas em --bh-x e --bh-y; o estado visual (scale)
     * vive aqui no CSS via classes — assim nao ha conflito entre quem
     * controla o transform. */
    --bh-x: 0;
    --bh-y: 0;
    --bh-scale: 0.82;

    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 5px;
    z-index: 10;

    opacity: 0;
    pointer-events: none;
    transform: translate3d(var(--bh-x), var(--bh-y), 0) scale(var(--bh-scale));
    transform-origin: center;

    /* HIDDEN: transform sem transition (snap). enquanto invisivel, nao
     * queremos o elemento "voando" entre posicoes — quando reaparecer,
     * ja deve estar no destino. */
    transition:
        transform 0s,
        opacity 110ms cubic-bezier(0.4, 0, 1, 1),
        background-color 120ms ease;
    will-change: transform, opacity;
}

.bh-handle.bh-visible,
.bh-plus.bh-visible {
    --bh-scale: 1;
    opacity: 0.9;
    pointer-events: auto;
    /* VISIBLE: transform com transition (slide entre blocos), opacity com
     * easing expo-out (chegada suave). */
    transition:
        transform 140ms cubic-bezier(0.4, 0, 0.2, 1),
        opacity 160ms cubic-bezier(0.16, 1, 0.3, 1),
        background-color 120ms ease;
}

/* hover/active visual (slate background pra contraste sutil) */
.bh-handle.bh-visible:hover,
.bh-plus.bh-visible:hover {
    opacity: 1;
    background-color: #eef2f7;
}

.bh-handle.bh-visible:active,
.bh-plus.bh-visible:active {
    --bh-scale: 0.94;
    background-color: #e2e8f0;
    transition-duration: 90ms;
}

.bh-handle {
    cursor: grab;
}
.bh-handle.bh-visible:active {
    cursor: grabbing;
}
.bh-handle.bh-dragging {
    opacity: 0.4;
    cursor: grabbing;
}

.bh-plus {
    cursor: pointer;
}

/* ================ icones (SVG inline via background-image) ================
 *
 * usamos background-image em vez de <svg> filho pra simplificar o markup
 * e permitir trocar a cor por tema apenas mudando o data URI (custo trivial).
 *
 * stroke colors:
 *   default: %23475569 (slate-600)
 *   hover:   %23334155 (slate-700)  -> peso 2.5 no hover (ligeiramente mais grosso)
 */

.bh-handle::before,
.bh-plus::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    pointer-events: none;
    transition: background-image 100ms ease;
}

/* drag handle: 6 pontinhos (grip-vertical do lucide) */
.bh-handle::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='12' r='1'/><circle cx='9' cy='5' r='1'/><circle cx='9' cy='19' r='1'/><circle cx='15' cy='12' r='1'/><circle cx='15' cy='5' r='1'/><circle cx='15' cy='19' r='1'/></svg>");
}

.bh-handle:hover::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='12' r='1'/><circle cx='9' cy='5' r='1'/><circle cx='9' cy='19' r='1'/><circle cx='15' cy='12' r='1'/><circle cx='15' cy='5' r='1'/><circle cx='15' cy='19' r='1'/></svg>");
}

/* plus: cruz simples (lucide plus) */
.bh-plus::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'><path d='M12 5v14'/><path d='M5 12h14'/></svg>");
}

.bh-plus:hover::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M12 5v14'/><path d='M5 12h14'/></svg>");
}

/* ================ drag/select visual feedback (estilo ClickUp/Notion) =========
 *
 * 3 estados visuais, todos com o mesmo "look" azul:
 *   1. .ProseMirror-selectednode  → automatico, aplicado pelo ProseMirror
 *      em NodeSelection (drag em curso, clique em image/hr, etc). Garante
 *      destaque mesmo que o JS nao consiga adicionar `bh-block-dragging`.
 *      Tambem sobrescreve o outline cyan default `.ProseMirror-selectednode
 *      { outline: 2px solid #8cf }` por algo mais polido.
 *   2. .bh-block-dragging          → adicionado em _onHandleDragStart, da o
 *      "lift" extra (translateY + sombra) por cima do destaque base.
 *   3. .bh-block-selected          → menu de acoes aberto (click no handle).
 *      Mesmo destaque, sem o lift (pra nao parecer vibrando).
 *
 * Cor base: blue-500 (#3b82f6) a 18% pro bg, 40% pra borda, 20% pra glow.
 * Subi de 10% pra 18% pq a opacidade anterior estava sutil demais sobre
 * fundo branco — quase invisivel.
 */

/* override do outline default + aplica destaque azul a qualquer NodeSelection */
.ProseMirror .ProseMirror-selectednode,
.bh-block-dragging,
.bh-block-selected {
    background-color: rgba(59, 130, 246, 0.18) !important;
    box-shadow:
        0 0 0 1.5px rgba(59, 130, 246, 0.45),
        0 4px 12px rgba(59, 130, 246, 0.20) !important;
    border-radius: 6px !important;
    outline: none !important;
    transition:
        background-color 120ms ease,
        box-shadow 140ms cubic-bezier(0.4, 0, 0.2, 1),
        transform 140ms cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    z-index: 5;
}

/* leve "pickup" so durante drag (nao em selected/clique) — UX feel
 * responsivo, microscopico pra nao desencaixar o layout. */
.bh-block-dragging {
    transform: translateY(-1px) !important;
}

/* Dropcursor (linha azul horizontal mostrando onde solta o bloco). */
.ProseMirror .bh-dropcursor,
.ProseMirror-dropcursor.bh-dropcursor {
    background-color: #3b82f6 !important;
    border-radius: 2px;
    /* glow sutil pra destacar mais — o dropcursor default do prosemirror
     * e' so' uma barra solida, fica meio invisivel em fundo branco. */
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    pointer-events: none;
}

.mention-dropdown[data-v-c64e91af] {
    position: fixed;
    z-index: 999999;
    background: white;
    border: 1px solid #dfe1e6;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    min-width: 280px;
    overflow: hidden;
}
.mention-dropdown-list[data-v-c64e91af] {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar customization */
.mention-dropdown-list[data-v-c64e91af]::-webkit-scrollbar {
    width: 6px;
}
.mention-dropdown-list[data-v-c64e91af]::-webkit-scrollbar-track {
    background: #f9fafb;
}
.mention-dropdown-list[data-v-c64e91af]::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
.mention-dropdown-list[data-v-c64e91af]::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
.mention-dropdown-item[data-v-c64e91af] {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}
.mention-dropdown-item[data-v-c64e91af]:last-child {
    border-bottom: none;
}
.mention-dropdown-item[data-v-c64e91af]:hover,
.mention-dropdown-item--active[data-v-c64e91af] {
    background-color: #f3f4f6;
}
.mention-dropdown-avatar[data-v-c64e91af] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.mention-dropdown-info[data-v-c64e91af] {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mention-dropdown-name[data-v-c64e91af] {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mention-dropdown-username[data-v-c64e91af] {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mention-dropdown-loading[data-v-c64e91af] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: #6b7280;
    font-size: 13px;
}
.mention-dropdown-spinner[data-v-c64e91af] {
    animation: spin-c64e91af 1s linear infinite;
}
@keyframes spin-c64e91af {
from {
        transform: rotate(0deg);
}
to {
        transform: rotate(360deg);
}
}

.slash-dropdown[data-v-27497b1f] {
  position: fixed;
  z-index: 100000;
  width: 320px;
  max-height: 380px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.08),
    0 12px 28px -4px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  animation: slash-dropdown-in-27497b1f 0.12s ease;
  display: flex;
  flex-direction: column;
}
@keyframes slash-dropdown-in-27497b1f {
from { opacity: 0; transform: translateY(4px);
}
to   { opacity: 1; transform: translateY(0);
}
}
.slash-dropdown-list[data-v-27497b1f] {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px;
}
.slash-dropdown-section-label[data-v-27497b1f] {
  padding: 8px 10px 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #94a3b8;
  text-transform: uppercase;
}
.slash-dropdown-item[data-v-27497b1f] {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}
.slash-dropdown-item[data-v-27497b1f]:hover,
.slash-dropdown-item--active[data-v-27497b1f] {
  background: #f5f3ff;
}
.slash-dropdown-icon[data-v-27497b1f] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}
.slash-dropdown-item:hover .slash-dropdown-icon[data-v-27497b1f],
.slash-dropdown-item--active .slash-dropdown-icon[data-v-27497b1f] {
  background: #ffffff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.slash-dropdown-text[data-v-27497b1f] {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.slash-dropdown-title[data-v-27497b1f] {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
}
.slash-dropdown-desc[data-v-27497b1f] {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.3;
}
.slash-dropdown-item--active .slash-dropdown-title[data-v-27497b1f],
.slash-dropdown-item:hover .slash-dropdown-title[data-v-27497b1f] {
  color: #6d28d9;
}
.slash-dropdown-empty[data-v-27497b1f] {
  padding: 14px 16px;
  font-size: 12.5px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid #f1f5f9;
}

/* Scrollbar */
.slash-dropdown-list[data-v-27497b1f]::-webkit-scrollbar { width: 6px;
}
.slash-dropdown-list[data-v-27497b1f]::-webkit-scrollbar-track { background: transparent;
}
.slash-dropdown-list[data-v-27497b1f]::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px;
}
.slash-dropdown-list[data-v-27497b1f]::-webkit-scrollbar-thumb:hover { background: #cbd5e1;
}

/* ============================= */
/* WRAPPER                       */
/* ============================= */
.text-area-default-ui-wrapper[data-v-dfde4074] {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.text-area-default-ui-wrapper--disabled[data-v-dfde4074] {
  opacity: 0.6;
  pointer-events: none;
}

/* ============================= */
/* LABEL                         */
/* ============================= */
.text-area-default-ui-label[data-v-dfde4074] {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  line-height: 1.4;
  margin-bottom: 2px;
}
.text-area-default-ui-label--required[data-v-dfde4074]::after {
  content: ' *';
  color: #ef4444;
}

/* ============================= */
/* CONTAINER                     */
/* ============================= */
.text-area-default-ui-container[data-v-dfde4074] {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, min-height 0.2s ease;
  /* overflow: visible so toolbar dropdowns are not clipped */
  overflow: visible;
}

/* Variants */
.text-area-default-ui-container--default[data-v-dfde4074]  { border-color: #d1d5db;
}
.text-area-default-ui-container--filled[data-v-dfde4074]   { background: #f9fafb; border-color: transparent;
}
.text-area-default-ui-container--outlined[data-v-dfde4074] { border-color: #9ca3af;
}

/* States */
.text-area-default-ui-container--focused[data-v-dfde4074] {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.text-area-default-ui-container--error[data-v-dfde4074] {
  border-color: #ef4444;
}
.text-area-default-ui-container--error.text-area-default-ui-container--focused[data-v-dfde4074] {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.text-area-default-ui-container--dragging-file[data-v-dfde4074] {
  border-style: dashed;
  border-color: #3b82f6;
  background: #eff6ff;
}
.text-area-default-ui-container--disabled[data-v-dfde4074] {
  background: #f3f4f6;
  cursor: not-allowed;
}
.text-area-default-ui-container--readonly[data-v-dfde4074] {
  background: #fafafa;
}

/* Hover */
.text-area-default-ui-container[data-v-dfde4074]:not(.text-area-default-ui-container--disabled):not(.text-area-default-ui-container--readonly):hover {
  border-color: #9ca3af;
}
.text-area-default-ui-container--focused[data-v-dfde4074]:hover { border-color: #3b82f6;
}
.text-area-default-ui-container--error[data-v-dfde4074]:hover   { border-color: #ef4444;
}

/* Sizes */
.text-area-default-ui-container--sm[data-v-dfde4074] { min-height: 34px;
}
.text-area-default-ui-container--md[data-v-dfde4074] { min-height: 38px;
}
.text-area-default-ui-container--lg[data-v-dfde4074] { min-height: 46px;
}

/* Rich Container sizing */
.text-area-default-ui-container--rich[data-v-dfde4074]                          { min-height: 38px;
}
.text-area-default-ui-container--rich.text-area-default-ui-container--expanded[data-v-dfde4074] { min-height: 90px;
}
.text-area-default-ui-container--rich.text-area-default-ui-container--expanded.text-area-default-ui-container--with-content[data-v-dfde4074] { min-height: 130px;
}

/* ============================= */
/* TIPTAP TOOLBAR                */
/* ============================= */
.tiptap-toolbar[data-v-dfde4074] {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  flex-wrap: wrap;
  background: #fafbfc;

  /* Hidden state */
  max-height: 0;
  overflow: hidden;
  padding: 0 8px;
  border-bottom: none;
  transition: max-height 0.15s ease, padding 0.15s ease, border-color 0.15s ease;
}
.tiptap-toolbar--visible[data-v-dfde4074] {
  max-height: 52px;
  overflow: visible;
  padding: 5px 8px;
  border-bottom: 1px solid #f0f2f5;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fafbfc;
}

/* Toolbar groups */
.tiptap-toolbar-group[data-v-dfde4074] {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}
.tiptap-toolbar-btn[data-v-dfde4074] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  flex-shrink: 0;
  padding: 0;
}
.tiptap-toolbar-btn[data-v-dfde4074]:hover {
  background: #e9ecef;
  color: #111827;
}
.tiptap-toolbar-btn--active[data-v-dfde4074] {
  background: #e8f0fe;
  color: #1d4ed8;
}
.tiptap-toolbar-btn--active[data-v-dfde4074]:hover {
  background: #dce8fd;
}

/* Dropdown trigger buttons */
.tiptap-toolbar-btn--dropdown[data-v-dfde4074] {
  width: auto;
  padding: 0 5px;
  gap: 2px;
}
.tiptap-toolbar-btn--text[data-v-dfde4074] {
  width: auto;
  min-width: 52px;
  padding: 0 5px;
  gap: 2px;
  font-size: 11px;
  font-weight: 500;
}
.tiptap-toolbar-btn__text[data-v-dfde4074] {
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}

/* Add button */
/* ── Link Popover ─────────────────────────────────────────────────────── */
.tiptap-link-popover[data-v-dfde4074] {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 9999;
  width: 280px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tiptap-link-popover--floating[data-v-dfde4074] {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, calc(100vw - 16px));
  z-index: 12000;
}
.tiptap-link-popover__header[data-v-dfde4074] {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tiptap-link-popover__input[data-v-dfde4074] {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  color: #1f2937;
  background: #f9fafb;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tiptap-link-popover__input[data-v-dfde4074]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #ffffff;
}
.tiptap-link-popover__newtab[data-v-dfde4074] {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.tiptap-link-popover__newtab input[type="checkbox"][data-v-dfde4074] {
  width: 14px;
  height: 14px;
  accent-color: #3b82f6;
  cursor: pointer;
  flex-shrink: 0;
}
.tiptap-link-popover__actions[data-v-dfde4074] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tiptap-link-popover__actions-right[data-v-dfde4074] {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.tiptap-link-popover__remove[data-v-dfde4074] {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #ef4444;
  background: transparent;
  border: 1px solid #fca5a5;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tiptap-link-popover__remove[data-v-dfde4074]:hover {
  background: #fef2f2;
  border-color: #ef4444;
}
.tiptap-link-popover__cancel[data-v-dfde4074] {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tiptap-link-popover__cancel[data-v-dfde4074]:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}
.tiptap-link-popover__apply[data-v-dfde4074] {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: #3b82f6;
  border: 1px solid #3b82f6;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tiptap-link-popover__apply[data-v-dfde4074]:hover {
  background: #2563eb;
  border-color: #2563eb;
}

/* ── Compact toolbar plus button ─────────────────────────────────────── */
.tiptap-toolbar-btn--plus[data-v-dfde4074] {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.tiptap-toolbar--compact.tiptap-toolbar--visible[data-v-dfde4074] {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}
.tiptap-toolbar--compact.tiptap-toolbar--visible[data-v-dfde4074]::-webkit-scrollbar {
  display: none;
}
.tiptap-toolbar--compact .tiptap-toolbar-group--end[data-v-dfde4074] {
  margin-left: auto;
}
.tiptap-toolbar--narrow .tiptap-toolbar-group--end[data-v-dfde4074] {
  margin-left: auto;
}

/* Add button */
.tiptap-toolbar-btn--add[data-v-dfde4074] {
  width: auto;
  padding: 0 7px;
  gap: 3px;
  background: #f0f7ff;
  color: #2563eb;
  font-weight: 500;
  border: 1px solid #bfdbfe;
}
.tiptap-toolbar-btn--add[data-v-dfde4074]:hover {
  background: #dbeafe;
  color: #1d4ed8;
}
.tiptap-toolbar-btn__add-label[data-v-dfde4074] {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.tiptap-toolbar-divider[data-v-dfde4074] {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: #e5e7eb;
  margin: 0 3px;
  flex-shrink: 0;
  align-self: center;
  border-radius: 1px;
}

/* ============================= */
/* TOOLBAR DROPDOWNS             */
/* ============================= */
.tiptap-dropdown[data-v-dfde4074] {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12), 0 1px 4px rgba(15, 23, 42, 0.06);
  min-width: 182px;
  padding: 4px;
  animation: tiptap-dropdown-in-dfde4074 0.1s ease;
}
.tiptap-dropdown--floating[data-v-dfde4074] {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 12000;
}
.tiptap-dropdown--right[data-v-dfde4074] {
  left: auto;
  right: 0;
}
@keyframes tiptap-dropdown-in-dfde4074 {
from { opacity: 0; transform: translateY(-4px);
}
to   { opacity: 1; transform: translateY(0);
}
}
.tiptap-dropdown-item[data-v-dfde4074] {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #374151;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: background-color 0.1s ease, color 0.1s ease;
}
.tiptap-dropdown-item[data-v-dfde4074]:hover {
  background: #f3f4f6;
  color: #111827;
}
.tiptap-dropdown-item--active[data-v-dfde4074] {
  background: #e8f0fe;
  color: #1d4ed8;
}
.tiptap-dropdown-item--active[data-v-dfde4074]:hover {
  background: #dce8fd;
}
.tiptap-dropdown-item__label[data-v-dfde4074] {
  flex: 1;
  line-height: 1.3;
}
.tiptap-dropdown-item__meta[data-v-dfde4074] {
  font-size: 11px;
  color: #9ca3af;
  flex-shrink: 0;
}
.tiptap-dropdown-item__preview--p[data-v-dfde4074] {
  font-size: 11px;
  color: #9ca3af;
  flex: 1;
}

/* ============================= */
/* TIPTAP EDITOR WRAP + CONTENT  */
/* ============================= */
.tiptap-editor-wrap[data-v-dfde4074] {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 300px;
  overflow-y: auto;
  cursor: text;
  scroll-behavior: smooth;

  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.tiptap-editor-wrap[data-v-dfde4074]::-webkit-scrollbar {
  width: 4px;
}
.tiptap-editor-wrap[data-v-dfde4074]::-webkit-scrollbar-track {
  background: transparent;
}
.tiptap-editor-wrap[data-v-dfde4074]::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 4px;
}
.text-area-default-ui-editor[data-v-dfde4074] {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── ProseMirror core styles ──────────────────────────────────────────── */
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror {
  flex: 1;
  outline: none;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.65;
  color: #1f2937;
  min-height: 28px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Collapsed: minimal – allow one line for placeholder */
.text-area-default-ui-container--rich:not(.text-area-default-ui-container--expanded)
  .text-area-default-ui-editor[data-v-dfde4074] .ProseMirror {
  max-height: 44px;
  overflow: hidden;
}

/* Expanded */
.text-area-default-ui-container--rich.text-area-default-ui-container--expanded
  .text-area-default-ui-editor[data-v-dfde4074] .ProseMirror {
  min-height: 60px;
}
.text-area-default-ui-container--rich.text-area-default-ui-container--expanded.text-area-default-ui-container--with-content
  .text-area-default-ui-editor[data-v-dfde4074] .ProseMirror {
  min-height: 100px;
}

/* ProseMirror placeholder (TipTap v3)
 *
 * No v3 a Placeholder extension aplica AS DUAS classes (`is-empty` e
 * `is-editor-empty`) DIRETO no <p> vazio via `Decoration.node()`, NAO mais
 * no `.ProseMirror` raiz como era no v2. Por isso o seletor antigo
 * (`.ProseMirror.is-editor-empty p.is-empty`) deixou de casar e o
 * placeholder sumiu.
 *
 * Como o config usa `showOnlyCurrent: true` (default), so' o paragrafo
 * com o cursor recebe `is-empty` — entao podemos casar diretamente nele
 * sem medo de mostrar placeholder em multiplos paragrafos vazios
 * simultaneos.
 *
 * Ref: node_modules/@tiptap/extensions/dist/placeholder/index.js
 */
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror p.is-empty::before {
  content: attr(data-placeholder);
  float: left;
  color: #9ca3af;
  pointer-events: none;
  height: 0;
}

/* ── Content typography ──────────────────────────────────────────────── */
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror p             { margin: 0.35em 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror p:first-child { margin-top: 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror p:last-child  { margin-bottom: 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror strong        { font-weight: 600;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror em            { font-style: italic;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror s             { text-decoration: line-through;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror a {
  color: #3b82f6;
  text-decoration: underline;
  cursor: pointer;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror ul,
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror ol {
  padding-left: 1.5em;
  margin: 0.5em 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror ul:not(.task-list) { list-style-type: disc;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror ol { list-style-type: decimal;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li { margin: 0.2em 0;
}

/* ── Task list (Notion/ClickUp-style checklist) ──────────────────────── */
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror ul.task-list,
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror .task-list {
  list-style: none;
  padding-left: 0.25em;
  margin: 0.4em 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror .task-list .task-list {
  /* Checklists aninhadas — recuo */
  padding-left: 1.5em;
  margin: 0.2em 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0.15em 0;
  padding: 1px 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item > label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  /* Alinha o checkbox com a primeira linha do texto */
  margin-top: 4px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  cursor: pointer;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item > label > input[type="checkbox"] {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item > label > input[type="checkbox"]:hover {
  border-color: #94a3b8;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item > label > input[type="checkbox"]:checked {
  background: #2563eb;
  border-color: #2563eb;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item > label > input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* O <span> que vem depois do input no markup do TipTap — escondemos */
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item > label > span {
  display: none;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item > div {
  flex: 1;
  min-width: 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item > div > p {
  margin: 0;
  line-height: 1.5;
}

/* Estado completado: texto cinza com strikethrough */
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror li.task-item[data-checked="true"] > div {
  color: #94a3b8;
  text-decoration: line-through;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror h1,
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror h2,
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror h3 {
  font-weight: 700;
  line-height: 1.3;
  margin: 0.6em 0 0.3em;
  color: #0f172a;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror h1 { font-size: 1.4em;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror h2 { font-size: 1.2em;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror h3 { font-size: 1.05em;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror blockquote {
  border-left: 3px solid #3b82f6;
  margin: 0.6em 0;
  padding: 4px 12px;
  color: #4b5563;
  background: #f8faff;
  border-radius: 0 4px 4px 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror code {
  background: #f1f5f9;
  color: #d63384;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.88em;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.85em;
  font-family: 'SFMono-Regular', Consolas, monospace;
  overflow-x: auto;
  margin: 0.6em 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror u { text-decoration: underline;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 1em 0;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror img,
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror video {
  display: block;
  max-width: min(100%, 320px);
  max-height: 180px;
  width: auto;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: 6px;
  margin-top: 4px;
  margin-left: auto;
  margin-right: auto;
}

/* Mention highlight */
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror [data-mention="true"] {
  background-color: #e3f2fd;
  color: #1565c0;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
  display: inline-block;
}

/* Pre-mount placeholder */
.tiptap-pre-mount-placeholder[data-v-dfde4074] {
  padding: 8px 12px;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.65;
  min-height: 28px;
}

/* Disabled overlay */
.text-area-default-ui-container--disabled .tiptap-editor-wrap[data-v-dfde4074],
.text-area-default-ui-container--disabled .tiptap-toolbar[data-v-dfde4074] {
  opacity: 0.7;
  pointer-events: none;
}

/* ============================= */
/* PLAIN TEXTAREA                */
/* ============================= */
.text-area-default-ui-textarea[data-v-dfde4074] {
  width: 100%;
  min-height: 80px;
  padding: 8px 12px;
  border: none;
  outline: none;
  background: transparent;
  resize: vertical;
  font-size: 13px;
  line-height: 1.65;
  color: #1f2937;
  font-family: inherit;
}
.text-area-default-ui-textarea[data-v-dfde4074]::-moz-placeholder { color: #9ca3af;
}
.text-area-default-ui-textarea[data-v-dfde4074]::placeholder { color: #9ca3af;
}
.text-area-default-ui-textarea[data-v-dfde4074]:-moz-read-only    { cursor: not-allowed; color: #6b7280;
}
.text-area-default-ui-textarea[data-v-dfde4074]:disabled,
.text-area-default-ui-textarea[data-v-dfde4074]:read-only    { cursor: not-allowed; color: #6b7280;
}

/* ============================= */
/* SPINNER                       */
/* ============================= */
.text-area-default-ui-spinner[data-v-dfde4074] {
  position: absolute;
  bottom: 8px;
  right: 10px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.text-area-default-ui-spinner-icon[data-v-dfde4074] {
  animation: text-area-default-ui-spin-dfde4074 1s linear infinite;
  color: #6b7280;
}
@keyframes text-area-default-ui-spin-dfde4074 {
from { transform: rotate(0deg);
}
to   { transform: rotate(360deg);
}
}

/* ============================= */
/* MESSAGES & COUNTER            */
/* ============================= */
.text-area-default-ui-message[data-v-dfde4074]       { font-size: 12px; color: #6b7280;
}
.text-area-default-ui-message--error[data-v-dfde4074] { color: #ef4444;
}
.text-area-default-ui-error[data-v-dfde4074],
.text-area-default-ui-helper[data-v-dfde4074] { display: flex; align-items: center; gap: 4px;
}
.text-area-default-ui-error-icon[data-v-dfde4074] { flex-shrink: 0;
}
.text-area-default-ui-counter[data-v-dfde4074]         { font-size: 11px; color: #9ca3af; text-align: right; margin-top: 2px;
}
.text-area-default-ui-counter--warning[data-v-dfde4074] { color: #d97706;
}

/* ============================= */
/* RESPONSIVE                    */
/* ============================= */
@media (max-width: 640px) {
.tiptap-toolbar-btn[data-v-dfde4074] {
    width: 28px;
    height: 28px;
}
.text-area-default-ui-editor[data-v-dfde4074] .ProseMirror {
    font-size: 14px;
}
}
