/**
 * Univer Calc — переиспользуемый компонент табличного редактора
 * NeuroEGE
 */

.univer-calc-container {
  min-height: 400px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.neuroege-formula-preview {
  position: absolute;
  top: 38px;
  left: 18%;
  right: 0;
  z-index: 100;
  width: 100%;
  padding: 0.35rem 0.6rem;
  pointer-events: none;
  font-family: inherit;
  font-size: 0.875rem;
  background: var(--univer-bg-gray-50, rgba(249, 250, 251, 0.98));
  border: 1px solid var(--univer-border, rgba(209, 213, 219, 0.8));
  border-radius: 4px;
  color: var(--univer-text-gray-900, #111827);
  box-sizing: border-box;
}

.univer-calc-container[data-theme="dark"] .neuroege-formula-preview,
.dark .neuroege-formula-preview {
  background: rgba(31, 41, 55, 0.98);
  border-color: rgba(75, 85, 99, 0.8);
  color: #f3f4f6;
}

.neuroege-formula-preview:focus {
  outline: none;
}

.univer-calc-container #univer-calc-app {
  flex: 1;
  min-height: 350px;
  width: 100%;
}

/* Univer root needs explicit height */
.calc-widget--univer .univer-calc-container {
  min-height: 450px;
}

.calc-widget--univer .calc-answer {
  flex-shrink: 0;
  padding: 0.75rem;
  border-top: 1px solid var(--border, rgba(255,255,255,0.1));
}
