/**
 * CHEFE PRO - BLOCO DE NOTAS DO WINDOWS 11 (NOTEPAD REPLICA)
 * Renderização pixel-perfect inspirada na captura do cliente
 */

.notepad-window-container {
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  min-height: 650px;
}

/* 1. BARRA DE TÍTULO E ABAS (WINDOWS 11 STYLE) */
.notepad-titlebar {
  background: #181818;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem 0 0.75rem;
  height: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
}

.notepad-tabs-track {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
  padding-top: 6px;
  overflow-x: auto;
  max-width: calc(100% - 160px);
  scrollbar-width: thin;
}

.notepad-tabs-track::-webkit-scrollbar {
  height: 3px;
}

.notepad-tabs-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.notepad-tab {
  background: #181818;
  color: #aaa;
  font-family: 'Segoe UI', -apple-system, sans-serif;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  user-select: none;
}

.notepad-tab:hover {
  background: #232323;
  color: #eee;
}

.notepad-tab.active {
  background: #1e1e1e;
  color: #fff;
  font-weight: 600;
  border-top: 1px solid rgba(16, 185, 129, 0.4);
  border-bottom: 2px solid #10b981;
  box-shadow: 0 -2px 10px rgba(16, 185, 129, 0.15);
}

.tab-icon {
  font-size: 14px;
  opacity: 0.85;
}

.tab-title {
  font-weight: 500;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-close-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tab-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.notepad-tab-add {
  background: none;
  border: none;
  color: #aaa;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 2px;
}

.notepad-tab-add:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.notepad-window-controls {
  display: flex;
  align-items: center;
}

.win-control-btn {
  background: none;
  border: none;
  color: #bbb;
  width: 44px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.win-control-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.win-control-btn.close:hover {
  background: #e81123;
  color: #fff;
}

/* 2. MENU BAR (ARQUIVO, EDITAR, EXIBIR) */
.notepad-menubar {
  background: #202020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'Segoe UI', -apple-system, sans-serif;
  font-size: 12px;
}

.menu-items-left {
  display: flex;
  align-items: center;
  gap: 2px;
}

.menu-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.menu-item-btn {
  background: none;
  border: none;
  color: #ccc;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.menu-item-btn:hover,
.menu-dropdown-wrapper:hover .menu-item-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.menu-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #2b2b2b;
  min-width: 230px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 0;
  z-index: 100;
  animation: fadeInMenu 0.12s ease-out;
}

@keyframes fadeInMenu {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-dropdown-wrapper:hover .menu-dropdown-content {
  display: block;
}

.menu-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 14px;
  background: none;
  border: none;
  color: #ddd;
  font-size: 12px;
  font-family: 'Segoe UI', -apple-system, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.menu-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.menu-dropdown-item .item-shortcut {
  font-size: 10px;
  color: #888;
  font-family: var(--font-mono);
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* Janela do Bloco de Notas Maximizada */
.notepad-window-container.maximized {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  z-index: 9999 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.notepad-window-container.minimized {
  height: 42px !important;
  min-height: 42px !important;
  overflow: hidden !important;
}

.menu-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-notepad-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-notepad-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-notepad-action.destaque-analisar {
  background: #10b981;
  color: #022c22;
  font-weight: 700;
  border: none;
}

.btn-notepad-action.destaque-analisar:hover {
  background: #34d399;
}

/* 3. ÁREA DE TEXTO PRINCIPAL (EDITOR) */
.notepad-editor-body {
  flex: 1;
  position: relative;
  display: flex;
  background: #1e1e1e;
  overflow: hidden;
}

.notepad-textarea {
  width: 100%;
  height: 100%;
  background: #1e1e1e;
  color: #f1f1f1;
  font-family: 'Consolas', 'Segoe UI Mono', 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  border: none;
  resize: none;
  padding: 14px 18px;
  outline: none;
  white-space: pre;
  tab-size: 4;
  overflow-y: scroll;
  overflow-x: auto;
}

.notepad-textarea::selection {
  background: rgba(16, 185, 129, 0.35);
  color: #fff;
}

/* Scrollbar estilo Windows 11 */
.notepad-textarea::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.notepad-textarea::-webkit-scrollbar-track {
  background: #1e1e1e;
}

.notepad-textarea::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 6px;
  border: 3px solid #1e1e1e;
}

.notepad-textarea::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

/* 4. BARRA DE STATUS (WINDOWS 11 STATUS BAR) */
.notepad-statusbar {
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  font-family: 'Segoe UI', -apple-system, sans-serif;
  font-size: 11.5px;
  color: #aaa;
  user-select: none;
}

.status-cell {
  padding: 2px 4px;
}

.status-cell:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 2px;
}

/* ZONA DE ARRASTO TXT RÁPIDO */
.dropzone-txt-overlay {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  margin: 8px 12px;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  color: #888;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.dropzone-txt-overlay.drag-active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
