/* ==========================================================================
TUGAEDITOR v1.2
========================================================================== */
:root {
--te-bg: #ffffff;
--te-toolbar-bg-top: #fafafa;
--te-toolbar-bg-bottom: #efefef;
--te-border: #d6d6d6;
--te-border-strong: #cccccc;
--te-text: #2b2b2b;
--te-text-muted: #666666;
--te-primary: #0088cc;
--te-primary-hover: #006da3;
--te-primary-soft: #e6f4fb;
--te-primary-border: #99d5f3;
--te-dark-bar: #383838;
--te-radius-lg: 5px;
--te-radius-md: 4px;
--te-radius-sm: 4px;
}

.te-wrapper {
border: 1px solid var(--te-border-strong);
border-radius: var(--te-radius-lg);
background: var(--te-bg);
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
font-size: 13px;
color: var(--te-text);
box-sizing: border-box;
position: relative;
width: 100%;
overflow: visible;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
transition: border-color 0.15s ease, box-shadow 0.15s ease;
text-align: left;
}
.te-wrapper:focus-within {
border-color: #88bad6;
box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.12);
}
.te-wrapper *,
.te-modal-overlay * {
box-sizing: border-box;
}
.te-wrapper.te-maximized {
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100vw !important;
height: 100vh !important;
border-radius: 0 !important;
z-index: 99990 !important;
display: flex;
flex-direction: column;
}
.te-wrapper.te-maximized .te-editor-body {
flex: 1;
height: auto !important;
overflow-y: auto !important;
}
.te-wrapper.te-maximized .te-wysiwyg-area,
.te-wrapper.te-maximized .te-source-area,
.te-wrapper.te-maximized .te-preview-area {
height: 100% !important;
overflow-y: auto !important;
}

/* ==========================================================================
BARRA DE RECUPERAÇÃO DE RASCUNHO (AUTO-SAVE LOCAL)
========================================================================== */
.te-draft-banner {
display: none;
align-items: center;
justify-content: space-between;
gap: 10px;
background: #fffbeb;
border-bottom: 1px solid #fcd34d;
color: #92400e;
padding: 7px 12px;
font-size: 12px;
font-weight: 500;
}
.te-draft-banner-actions {
display: flex;
gap: 6px;
align-items: center;
}
.te-draft-btn {
border: 1px solid #d97706;
background: #f59e0b;
color: #ffffff;
border-radius: 3px;
padding: 3px 9px;
font-size: 11.5px;
font-weight: 600;
cursor: pointer;
transition: background 0.12s ease;
}
.te-draft-btn:hover {
background: #d97706;
}
.te-draft-btn.te-draft-discard {
background: #ffffff;
color: #92400e;
border-color: #fcd34d;
}
.te-draft-btn.te-draft-discard:hover {
background: #fef3c7;
}

/* ==========================================================================
BARRA DE FERRAMENTAS (INTEGRADA COM OS CABEÇALHOS DO FÓRUM TUGATECH)
========================================================================== */
.te-toolbar {
position: relative;
z-index: 1000;
background: linear-gradient(180deg, var(--te-toolbar-bg-top) 0%, var(--te-toolbar-bg-bottom) 100%);
border-bottom: 1px solid var(--te-border-strong);
border-top-left-radius: calc(var(--te-radius-lg) - 1px);
border-top-right-radius: calc(var(--te-radius-lg) - 1px);
padding: 6px 8px;
user-select: none;
box-shadow: inset 0 1px 0 #ffffff;
transition: box-shadow 0.18s ease, background-color 0.18s ease;
}
.te-toolbar.te-toolbar-stuck {
position: fixed !important;
z-index: 99980 !important;
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
border-top: 1px solid var(--te-border-strong);
border-left: 1px solid var(--te-border-strong);
border-right: 1px solid var(--te-border-strong);
background: linear-gradient(180deg, rgba(250, 250, 250, 0.98) 0%, rgba(238, 238, 238, 0.98) 100%);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
box-shadow: 0 6px 14px -3px rgba(0, 0, 0, 0.14), inset 0 1px 0 #ffffff;
}
.te-toolbar-placeholder {
display: none;
width: 100%;
}
.te-toolbar-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 2px;
padding: 2px 0;
}
.te-toolbar-row + .te-toolbar-row {
margin-top: 4px;
padding-top: 5px;
border-top: 1px solid #dcdcdc;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.te-separator {
width: 1px;
height: 18px;
background: #d0d0d0;
border-right: 1px solid rgba(255, 255, 255, 0.8);
margin: 0 3px;
display: inline-block;
}
.te-spacer {
flex: 1;
}

/* Botões da Toolbar */
.te-btn {
background: transparent;
border: 1px solid transparent;
border-radius: var(--te-radius-sm);
color: #444444;
cursor: pointer;
height: 28px;
min-width: 27px;
padding: 0 6px;
display: inline-flex;
align-items: center;
justify-content: center;
font-family: inherit;
font-size: 13px;
line-height: 1;
position: relative;
transition: all 0.12s ease;
}
.te-btn:hover:not(:disabled) {
background: #ffffff;
color: #111111;
border-color: #bbbbbb;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.te-btn:active:not(:disabled) {
background: #e6e6e6;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.te-btn.te-active {
background: var(--te-primary-soft);
color: var(--te-primary-hover);
border-color: var(--te-primary-border);
font-weight: 600;
box-shadow: inset 0 1px 2px rgba(0, 136, 204, 0.1);
}
.te-btn:disabled {
opacity: 0.35;
cursor: default;
}
.te-btn-label {
margin-left: 5px;
font-size: 12px;
font-weight: 600;
}
.te-omega-icon {
font-family: "Times New Roman", Georgia, serif;
font-weight: bold;
font-size: 15px;
line-height: 1;
display: inline-block;
}

/* Selects / Dropdowns da Toolbar */
.te-select {
height: 28px;
border: 1px solid #c4c4c4;
background-color: #ffffff;
border-radius: var(--te-radius-sm);
padding: 0 26px 0 9px;
font-family: inherit;
font-size: 12px;
font-weight: 500;
color: #333333;
cursor: pointer;
outline: none;
appearance: none;
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 7px center;
background-size: 12px;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.te-select:hover {
border-color: #999999;
}
.te-select:focus {
border-color: var(--te-primary);
box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.12);
}

/* ==========================================================================
ÁREA DE EDIÇÃO WYSIWYG, PREVIEW REAL E CÓDIGO FONTE (COM AUTO-GROW)
========================================================================== */
.te-editor-body {
position: relative;
min-height: 380px;
height: auto;
background: #ffffff;
}
.te-wrapper .te-editor-body .te-wysiwyg-area,
.te-wrapper .te-editor-body .te-preview-area {
width: 100%;
min-height: 380px;
height: auto;
padding: 16px 18px 32px 18px;
overflow-y: hidden;
outline: none;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
font-size: 14.5px;
line-height: 1.65;
color: #222222;
}
.te-wrapper .te-editor-body .te-preview-area {
display: none;
background: #fcfcfc;
border-top: 2px solid var(--te-primary);
}
.te-preview-badge {
display: inline-flex;
align-items: center;
gap: 6px;
background: var(--te-primary-soft);
color: var(--te-primary-hover);
border: 1px solid var(--te-primary-border);
border-radius: 4px;
padding: 4px 10px;
font-size: 11.5px;
font-weight: 700;
margin-bottom: 14px;
user-select: none;
}

/* Espaçamento obrigatório entre parágrafos (No Editor e no Modo Preview) */
.te-wrapper .te-editor-body .te-wysiwyg-area p,
.te-wrapper .te-editor-body .te-wysiwyg-area > div:not(.te-info-box):not(.te-code-block),
.te-wrapper .te-editor-body .te-preview-area p,
.te-wrapper .te-editor-body .te-preview-area > div:not(.te-info-box):not(.te-code-block):not(.te-preview-badge) {
display: block !important;
margin-top: 0 !important;
margin-bottom: 1.3em !important;
padding: 0;
}
.te-wrapper .te-editor-body .te-wysiwyg-area p + p,
.te-wrapper .te-editor-body .te-wysiwyg-area > div + div,
.te-wrapper .te-editor-body .te-wysiwyg-area p + div,
.te-wrapper .te-editor-body .te-wysiwyg-area div + p,
.te-wrapper .te-editor-body .te-preview-area p + p {
margin-top: 1.3em !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area p:last-child,
.te-wrapper .te-editor-body .te-wysiwyg-area > div:last-child,
.te-wrapper .te-editor-body .te-preview-area p:last-child {
margin-bottom: 0 !important;
}

/* Listas e itens (Força o aparecimento das bolas/números sobrepondo o reset do fórum) */
.te-wrapper .te-editor-body .te-wysiwyg-area ul,
.te-wrapper .te-editor-body .te-wysiwyg-area ol,
.te-wrapper .te-editor-body .te-preview-area ul,
.te-wrapper .te-editor-body .te-preview-area ol {
display: block !important;
margin-top: 0 !important;
margin-bottom: 1.3em !important;
padding-left: 28px !important;
list-style-position: outside !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area ul,
.te-wrapper .te-editor-body .te-preview-area ul {
list-style-type: disc !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area ul ul,
.te-wrapper .te-editor-body .te-preview-area ul ul {
list-style-type: circle !important;
margin-bottom: 0.4em !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area ul ul ul,
.te-wrapper .te-editor-body .te-preview-area ul ul ul {
list-style-type: square !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area ol,
.te-wrapper .te-editor-body .te-preview-area ol {
list-style-type: decimal !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area li,
.te-wrapper .te-editor-body .te-preview-area li {
display: list-item !important;
list-style: inherit !important;
margin-bottom: 0.35em !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area ul > li,
.te-wrapper .te-editor-body .te-preview-area ul > li {
list-style-type: disc !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area ul ul > li,
.te-wrapper .te-editor-body .te-preview-area ul ul > li {
list-style-type: circle !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area ol > li,
.te-wrapper .te-editor-body .te-preview-area ol > li {
list-style-type: decimal !important;
}

/* Centragem de blocos e imagens /
.te-wrapper .te-editor-body .te-wysiwyg-area p[align="center"],
.te-wrapper .te-editor-body .te-wysiwyg-area div[align="center"],
.te-wrapper .te-editor-body .te-wysiwyg-area center,
.te-wrapper .te-editor-body .te-wysiwyg-area [style="text-align: center"],
.te-wrapper .te-editor-body .te-wysiwyg-area [style*="text-align:center"],
.te-wrapper .te-editor-body .te-preview-area p[align="center"],
.te-wrapper .te-editor-body .te-preview-area [style*="text-align: center"],
.te-wrapper .te-editor-body .te-preview-area [style*="text-align:center"] {
text-align: center !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area p[align="center"] img,
.te-wrapper .te-editor-body .te-wysiwyg-area div[align="center"] img,
.te-wrapper .te-editor-body .te-wysiwyg-area center img,
.te-wrapper .te-editor-body .te-wysiwyg-area [style*="text-align: center"] img,
.te-wrapper .te-editor-body .te-wysiwyg-area [style*="text-align:center"] img,
.te-wrapper .te-editor-body .te-preview-area [style*="text-align: center"] img,
.te-wrapper .te-editor-body .te-preview-area [style*="text-align:center"] img {
display: inline-block !important;
margin-left: auto !important;
margin-right: auto !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area img[align="center"],
.te-wrapper .te-editor-body .te-wysiwyg-area img[align="middle"],
.te-wrapper .te-editor-body .te-wysiwyg-area img.aligncenter,
.te-wrapper .te-editor-body .te-wysiwyg-area img[style*="margin-left: auto"],
.te-wrapper .te-editor-body .te-wysiwyg-area img[style*="margin-left:auto"],
.te-wrapper .te-editor-body .te-wysiwyg-area img[style*="margin: 0 auto"],
.te-wrapper .te-editor-body .te-wysiwyg-area img[style*="margin:0 auto"],
.te-wrapper .te-editor-body .te-wysiwyg-area img[style*="margin: auto"],
.te-wrapper .te-editor-body .te-wysiwyg-area img[style*="margin:auto"],
.te-wrapper .te-editor-body .te-preview-area img[style*="margin-left: auto"],
.te-wrapper .te-editor-body .te-preview-area img[style*="margin-left:auto"] {
display: block !important;
margin-left: auto !important;
margin-right: auto !important;
}

/* Títulos dentro do Editor e Preview */
.te-wrapper .te-editor-body .te-wysiwyg-area h1,
.te-wrapper .te-editor-body .te-wysiwyg-area h2,
.te-wrapper .te-editor-body .te-wysiwyg-area h3,
.te-wrapper .te-editor-body .te-wysiwyg-area h4,
.te-wrapper .te-editor-body .te-preview-area h1,
.te-wrapper .te-editor-body .te-preview-area h2,
.te-wrapper .te-editor-body .te-preview-area h3,
.te-wrapper .te-editor-body .te-preview-area h4 {
color: #1a1a1a;
font-weight: 700;
letter-spacing: -0.01em;
margin-top: 1.4em !important;
margin-bottom: 0.6em !important;
line-height: 1.35;
}
.te-wrapper .te-editor-body .te-wysiwyg-area h2:first-child,
.te-wrapper .te-editor-body .te-wysiwyg-area h3:first-child {
margin-top: 0 !important;
}

.te-wrapper .te-editor-body .te-wysiwyg-area a,
.te-wrapper .te-editor-body .te-preview-area a {
color: #0066aa;
text-decoration: underline;
text-underline-offset: 2px;
}
.te-wrapper .te-editor-body .te-wysiwyg-area img,
.te-wrapper .te-editor-body .te-preview-area img {
max-width: 100%;
border-radius: 4px;
cursor: pointer;
transition: box-shadow 0.15s ease, outline 0.15s ease;
}
.te-wrapper .te-editor-body .te-wysiwyg-area img:hover,
.te-wrapper .te-editor-body .te-wysiwyg-area img.te-selected-img {
outline: 2px solid var(--te-primary);
outline-offset: 2px;
box-shadow: 0 4px 14px rgba(0, 136, 204, 0.2);
}
.te-wrapper .te-editor-body .te-wysiwyg-area blockquote,
.te-wrapper .te-editor-body .te-preview-area blockquote {
border-left: 4px solid var(--te-primary);
margin: 1.3em 0 !important;
padding: 10px 16px;
color: #444444;
background: #f7f7f7;
border-radius: 0 4px 4px 0;
font-style: italic;
}
.te-wrapper .te-editor-body .te-wysiwyg-area table,
.te-wrapper .te-editor-body .te-preview-area table {
border-collapse: collapse;
width: 100%;
margin: 1.3em 0 !important;
}
.te-wrapper .te-editor-body .te-wysiwyg-area table td,
.te-wrapper .te-editor-body .te-wysiwyg-area table th,
.te-wrapper .te-editor-body .te-preview-area table td,
.te-wrapper .te-editor-body .te-preview-area table th {
border: 1px solid #cccccc;
padding: 8px 10px;
min-width: 40px;
}
.te-wrapper .te-editor-body .te-wysiwyg-area figure.te-captioned-img,
.te-wrapper .te-editor-body .te-preview-area figure.te-captioned-img {
display: table;
background: #f7f7f7;
border: 1px solid #dddddd;
border-radius: 4px;
padding: 6px;
margin: 1.3em auto !important;
text-align: center;
}
.te-wrapper .te-editor-body .te-wysiwyg-area figure.te-captioned-img figcaption,
.te-wrapper .te-editor-body .te-preview-area figure.te-captioned-img figcaption {
display: table-caption;
caption-side: bottom;
background: #f7f7f7;
border: 1px solid #dddddd;
border-top: none;
border-radius: 0 0 4px 4px;
padding: 5px 8px;
font-size: 12px;
color: #666666;
font-style: italic;
}

/* ==========================================================================
BLOCOS DE CÓDIGO / TERMINAL (NOVO COMPONENTE)
========================================================================== */
.te-wrapper .te-editor-body pre,
.te-wrapper .te-editor-body .te-code-block {
background: #1e2227;
color: #e6edf3;
border: 1px solid #30363d;
border-left: 4px solid var(--te-primary);
border-radius: 5px;
padding: 12px 16px;
margin: 1.3em 0 !important;
font-family: "JetBrains Mono", Consolas, Monaco, "Courier New", monospace;
font-size: 13px;
line-height: 1.55;
overflow-x: auto;
white-space: pre-wrap;
word-break: break-word;
}
.te-wrapper .te-editor-body pre code {
background: transparent !important;
border: none !important;
color: inherit !important;
padding: 0 !important;
font-family: inherit;
font-size: inherit;
}

/* Estilos rápidos da dropdown "Estilos" */
.te-wrapper .te-editor-body .te-marker-yellow {
background-color: #fef08a;
padding: 1px 4px;
border-radius: 2px;
}
.te-wrapper .te-editor-body .te-marker-green {
background-color: #bbf7d0;
padding: 1px 4px;
border-radius: 2px;
}
.te-wrapper .te-editor-body .te-inline-code,
.te-wrapper .te-editor-body code:not(pre code) {
font-family: "JetBrains Mono", Consolas, Monaco, monospace;
background: #f2f2f2;
border: 1px solid #dddddd;
color: #222222;
padding: 1px 5px;
border-radius: 3px;
font-size: 88%;
}
.te-wrapper .te-editor-body .te-info-box {
background: #eef7fc;
border-left: 4px solid var(--te-primary);
padding: 12px 16px;
border-radius: 0 4px 4px 0;
margin: 1.3em 0 !important;
color: #0b4f75;
}

/* Modo Código Fonte */
.te-source-area {
width: 100%;
min-height: 380px;
height: auto;
border: none;
padding: 16px 18px 32px 18px;
font-family: "JetBrains Mono", "Consolas", "Courier New", monospace;
font-size: 13px;
line-height: 1.6;
color: #f0f0f0;
background: #262626;
resize: none;
overflow-y: hidden;
outline: none;
display: none;
}

/* ==========================================================================
BARRA FLUTUANTE RÁPIDA DE IMAGEM (AO CLICAR NUMA IMAGEM)
========================================================================== */
.te-img-quickbar {
position: absolute;
display: none;
align-items: center;
gap: 3px;
background: #2b2b2b;
border: 1px solid #1a1a1a;
border-radius: 5px;
padding: 4px 6px;
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
z-index: 99985;
user-select: none;
}
.te-img-quickbar button {
background: transparent;
border: 1px solid transparent;
color: #eeeeee;
border-radius: 3px;
height: 26px;
min-width: 26px;
padding: 0 6px;
font-size: 12px;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
transition: all 0.12s ease;
}
.te-img-quickbar button:hover {
background: rgba(255, 255, 255, 0.14);
color: #ffffff;
}
.te-img-quickbar button.te-qb-active {
background: var(--te-primary);
color: #ffffff;
}
.te-img-quickbar button.te-qb-danger:hover {
background: #dc2626;
color: #ffffff;
}
.te-img-quickbar-sep {
width: 1px;
height: 16px;
background: rgba(255, 255, 255, 0.2);
margin: 0 2px;
}

/* ==========================================================================
BARRA DE ESTADO INFERIOR (CAMINHO + CONTADOR + AUTO-SAVE + RESIZE)
========================================================================== */
.te-statusbar {
min-height: 28px;
background: linear-gradient(180deg, #f7f7f7 0%, #ededed 100%);
border-top: 1px solid var(--te-border-strong);
border-bottom-left-radius: calc(var(--te-radius-lg) - 1px);
border-bottom-right-radius: calc(var(--te-radius-lg) - 1px);
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 10px;
padding: 3px 8px 3px 12px;
font-size: 11px;
font-weight: 500;
color: var(--te-text-muted);
user-select: none;
}
.te-path {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: Consolas, Monaco, monospace;
font-size: 11px;
}
.te-status-right {
display: flex;
align-items: center;
gap: 12px;
margin-left: auto;
}
.te-stats {
color: #555555;
font-size: 11px;
display: inline-flex;
align-items: center;
gap: 8px;
}
.te-autosave-indicator {
color: #059669;
font-size: 11px;
font-weight: 600;
display: inline-flex;
align-items: center;
gap: 4px;
}
.te-resize-handle {
width: 14px;
height: 14px;
cursor: ns-resize;
opacity: 0.65;
transition: opacity 0.15s;
background: linear-gradient(135deg, transparent 50%, #888888 50%, #888888 65%, transparent 65%, transparent 80%, #888888 80%);
}
.te-resize-handle:hover {
opacity: 1;
}

/* ==========================================================================
POPOVERS FLUTUANTES (CORES, EMOJIS, CARACTERES ESPECIAIS)
========================================================================== */
.te-popover {
position: absolute;
background: #ffffff;
border: 1px solid #c4c4c4;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
z-index: 99995;
padding: 10px;
border-radius: 6px;
display: none;
animation: teFadeIn 0.12s ease-out;
}
@keyframes teFadeIn {
from { opacity: 0; transform: translateY(-3px); }
to { opacity: 1; transform: translateY(0); }
}
.te-color-grid {
display: grid;
grid-template-columns: repeat(8, 22px);
gap: 4px;
}
.te-color-swatch {
width: 22px;
height: 22px;
border-radius: 3px;
border: 1px solid rgba(0, 0, 0, 0.18);
cursor: pointer;
transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.te-color-swatch:hover {
transform: scale(1.15);
border-color: #222222;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}
.te-emoji-popover {
width: 300px;
}
.te-emoji-tabs {
display: flex;
background: #eeeeee;
border: 1px solid #dddddd;
border-radius: 5px;
margin-bottom: 8px;
padding: 2px;
gap: 3px;
}
.te-emoji-tab {
flex: 1;
background: none;
border: none;
cursor: pointer;
padding: 4px 6px;
border-radius: 4px;
font-size: 15px;
transition: all 0.12s ease;
}
.te-emoji-tab.active {
background: #ffffff;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.te-emoji-tab:hover:not(.active) {
background: rgba(255, 255, 255, 0.6);
}
.te-emoji-grid {
display: grid;
grid-template-columns: repeat(8, 1fr);
gap: 3px;
max-height: 195px;
overflow-y: auto;
padding-right: 2px;
}
.te-emoji-item {
font-size: 18px;
padding: 4px;
text-align: center;
cursor: pointer;
border-radius: 4px;
user-select: none;
transition: background 0.1s ease, transform 0.1s ease;
}
.te-emoji-item:hover {
background: var(--te-primary-soft);
transform: scale(1.12);
}

/* ==========================================================================
CAIXAS DE DIÁLOGO (MODAIS COM ESTILO TUGATECH)
========================================================================== */
.te-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(25, 25, 25, 0.55);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
z-index: 99999;
display: none;
align-items: center;
justify-content: center;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
font-size: 13px;
color: var(--te-text);
padding: 16px;
text-align: left;
}
.te-modal {
background: #ffffff;
border: 1px solid #b5b5b5;
border-radius: 6px;
box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
width: 500px;
max-width: 95vw;
display: flex;
flex-direction: column;
overflow: hidden;
animation: teModalPop 0.15s ease-out;
}
@keyframes teModalPop {
from { opacity: 0; transform: scale(0.97) translateY(6px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
.te-modal-header {
background: linear-gradient(180deg, #424242 0%, #303030 100%);
border-bottom: 2px solid var(--te-primary);
padding: 11px 16px;
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 700;
font-size: 13.5px;
color: #ffffff;
}
.te-modal-close {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.15);
width: 24px;
height: 24px;
border-radius: 4px;
font-size: 16px;
line-height: 1;
color: #e0e0e0;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.15s ease;
}
.te-modal-close:hover {
background: rgba(255, 255, 255, 0.22);
color: #ffffff;
}

/* Abas do Modal (Hiperligação) */
.te-modal-tabs {
display: flex;
background: #f2f2f2;
border-bottom: 1px solid #d0d0d0;
padding: 8px 16px 0 16px;
gap: 4px;
}
.te-modal-tab {
background: #e7e7e7;
border: 1px solid #d0d0d0;
border-bottom: none;
border-radius: 4px 4px 0 0;
padding: 7px 12px;
font-size: 12px;
font-weight: 600;
color: #555555;
cursor: pointer;
position: relative;
top: 1px;
transition: all 0.12s ease;
}
.te-modal-tab:hover:not(.active) {
color: #222222;
background: #efefef;
}
.te-modal-tab.active {
background: #ffffff;
color: var(--te-primary-hover);
border-color: #d0d0d0;
border-top: 2px solid var(--te-primary);
border-bottom: 1px solid #ffffff;
}

.te-modal-body {
padding: 18px;
background: #ffffff;
max-height: 75vh;
overflow-y: auto;
}
.te-form-group {
margin-bottom: 14px;
}
.te-form-group:last-child {
margin-bottom: 0;
}
.te-label {
display: block;
margin-bottom: 5px;
font-size: 12px;
font-weight: 700;
color: #333333;
}
.te-input,
.te-modal-select {
width: 100%;
height: 34px;
border: 1px solid #cccccc;
border-radius: var(--te-radius-md);
padding: 5px 10px;
font-family: inherit;
font-size: 13px;
color: #222222;
background: #ffffff;
outline: none;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.te-input:focus,
.te-modal-select:focus {
border-color: var(--te-primary);
box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.15);
}
.te-row {
display: flex;
gap: 12px;
align-items: flex-end;
}

/* Controlos específicos do Modal de Imagem */
.te-dim-box {
display: flex;
align-items: flex-end;
gap: 12px;
margin-bottom: 14px;
background: #f7f7f7;
padding: 10px 12px;
border-radius: var(--te-radius-md);
border: 1px solid #dddddd;
}
.te-dim-input {
width: 82px;
}
.te-dim-actions {
display: flex;
align-items: center;
gap: 5px;
padding-bottom: 1px;
}
.te-icon-action {
background: #ffffff;
border: 1px solid #c4c4c4;
cursor: pointer;
color: #444444;
font-size: 13px;
width: 32px;
height: 32px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: var(--te-radius-sm);
transition: all 0.12s ease;
}
.te-icon-action:hover {
background: #eeeeee;
color: #111111;
border-color: #999999;
}
.te-radio-list {
display: flex;
flex-wrap: wrap;
gap: 14px;
margin-top: 6px;
}
.te-radio-label,
.te-checkbox-label {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12.5px;
color: #333333;
cursor: pointer;
user-select: none;
}
.te-radio-label input,
.te-checkbox-label input {
accent-color: var(--te-primary);
width: 14px;
height: 14px;
cursor: pointer;
}
.te-btn-fit600 {
background: var(--te-primary-soft);
border: 1px solid var(--te-primary-border);
color: var(--te-primary-hover);
padding: 6px 12px;
border-radius: var(--te-radius-md);
font-family: inherit;
font-size: 12px;
font-weight: 600;
cursor: pointer;
margin-top: 4px;
transition: all 0.12s ease;
}
.te-btn-fit600:hover {
background: #d0ecfa;
border-color: var(--te-primary);
}
.te-img-status {
font-size: 11.5px;
font-weight: 600;
color: var(--te-primary-hover);
margin-top: 4px;
min-height: 15px;
}

/* Rodapé do Modal */
.te-modal-footer {
background: #f3f3f3;
border-top: 1px solid #d6d6d6;
padding: 11px 18px;
display: flex;
justify-content: flex-end;
gap: 8px;
}
.te-btn-confirm {
background: linear-gradient(180deg, #0095e0 0%, #0077b5 100%);
color: #ffffff;
border: 1px solid #006296;
padding: 7px 18px;
font-family: inherit;
font-weight: 700;
font-size: 12px;
letter-spacing: 0.02em;
cursor: pointer;
border-radius: var(--te-radius-md);
text-transform: uppercase;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.1);
transition: all 0.12s ease;
}
.te-btn-confirm:hover {
background: linear-gradient(180deg, #0082c4 0%, #00669c 100%);
}
.te-btn-cancel {
background: linear-gradient(180deg, #ffffff 0%, #efefef 100%);
color: #444444;
border: 1px solid #c4c4c4;
padding: 7px 16px;
font-family: inherit;
font-weight: 600;
font-size: 12px;
cursor: pointer;
border-radius: var(--te-radius-md);
transition: all 0.12s ease;
}
.te-btn-cancel:hover {
background: #e6e6e6;
color: #111111;
border-color: #adadad;
}

/* Estilos específicos para Modais de YouTube/HTML, Terminal e Publicação Social */
.te-modal.te-modal-wide {
width: 580px;
}
.te-textarea-embed {
width: 100%;
height: 110px;
border: 1px solid #cccccc;
border-radius: var(--te-radius-md);
padding: 8px 10px;
font-family: "JetBrains Mono", Consolas, Monaco, monospace;
font-size: 12px;
color: #222222;
background: #fafafa;
resize: vertical;
outline: none;
transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.te-textarea-embed:focus {
background: #ffffff;
border-color: var(--te-primary);
box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.15);
}
.te-checkbox-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px 14px;
margin: 12px 0;
background: #f7f7f7;
padding: 10px 12px;
border-radius: var(--te-radius-md);
border: 1px solid #dddddd;
}
.te-social-preview-box {
border: 1px dashed #bdbdbd;
border-radius: var(--te-radius-md);
background: #f8f8f8;
min-height: 280px;
max-height: 410px;
overflow-y: auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding: 12px;
position: relative;
margin-top: 10px;
}
.te-social-placeholder {
color: #888888;
font-size: 13px;
margin: auto 0;
text-align: center;
}
.te-social-size-bar {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 8px;
font-size: 12px;
color: #444444;
background: #f2f2f2;
padding: 6px 10px;
border: 1px solid #dddddd;
border-radius: var(--te-radius-md);
}