/* Стили для Markdown-контента */
.post-content {
    line-height: 1.6;
}
.post-content h1, .post-content h2, .post-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.post-content p {
    margin-bottom: 1rem;
}
.post-content ul, .post-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}
.post-content li {
    margin-bottom: 0.5rem;
}
.post-content blockquote {
    border-left: 4px solid #6c757d;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background-color: #f8f9fa;
    color: #495057;
}
.post-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
}
.post-content pre {
    background-color: #f6f8fa;
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden; /* Изменено с overflow-x: auto */
    border: 1px solid #e1e4e8;
    padding: 0; /* Удаляем отступы для pre */
}
.post-content pre code {
    display: block;
    padding: 1rem;
    overflow-x: auto;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875em;
    line-height: 1.6;
    color: #24292e;
    background-color: transparent;
    border-radius: 0;
}
.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.post-content th, .post-content td {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
}
.post-content th {
    background-color: #f8f9fa;
}

/* Стили для различных типов контента */
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }
.post-content h4 { font-size: 1rem; }
.post-content h5 { font-size: 0.875rem; }
.post-content h6 { font-size: 0.85rem; }

.post-content p {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-content ul, .post-content ol {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.25rem;
}

.post-content blockquote {
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    border-left: 4px solid #6c757d;
    background-color: #f8f9fa;
    color: #495057;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    display: block;
    border-radius: 4px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.post-content th, .post-content td {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    text-align: left;
}

.post-content th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Улучшенные стили для кода */
.post-content :not(pre) > code {
    padding: 0.2rem 0.4rem;
    background-color: #f6f8fa;
    border-radius: 3px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 0.875em;
    color: #e83e8c;
    word-wrap: break-word;
}

/* Стили для изображений в Markdown */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Стили для подписей к изображениям */
.post-content img + em {
  display: block;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

/* Модальное окно для увеличения изображений */
.post-content img:hover {
  cursor: zoom-in;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Добавьте стили для панели инструментов Markdown редактора */
.markdown-toolbar {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.markdown-toolbar button {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.markdown-toolbar button:last-child {
    margin-right: 0;
}

/* Стили для редактора Markdown */
.markdownx-editor {
    min-height: 300px;
    font-family: monospace;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    line-height: 1.5;
    width: 100%;
}

/* Если кнопка загрузки изображений добавлена, изменяем радиус у редактора */
.markdown-toolbar + .markdownx-editor {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Стили для сообщений индикации загрузки */
.alert {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.alert.small.py-1 {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}
/* SQL-стиль для таблиц */
.post-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    font-family: monospace;
    font-size: 0.9em;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #3c3c3c;
}

.post-content th {
    background-color: #252526;
    color: #9cdcfe;
    font-weight: bold;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 2px solid #3c3c3c;
    position: sticky;
    top: 0;
}

.post-content td {
    padding: 6px 12px;
    border-bottom: 1px solid #2d2d2d;
    vertical-align: top;
    line-height: 1.4;
}

/* Чередование строк */
.post-content tr:nth-child(even) {
    background-color: #2a2a2a;
}

/* Эффект при наведении */
.post-content tr:hover {
    background-color: #323233;
}

/* Стиль для заголовка таблицы */
.post-content caption {
    caption-side: bottom;
    font-size: 0.8em;
    color: #858585;
    padding: 8px 0;
    font-style: italic;
}

/* Стили для ячеек с кодом */
.post-content td code {
    background-color: rgba(90, 93, 94, 0.31);
    color: #ce9178;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.95em;
}

/* Стиль для NULL-значений */
.post-content .null-value {
    color: #569cd6;
    font-style: italic;
}

/* Стиль для числовых значений */
.post-content .numeric {
    color: #b5cea8;
    text-align: right;
}

/* Адаптивность */
@media (max-width: 768px) {
    .post-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Стиль для ключевых полей */
.post-content .primary-key {
    color: #4ec9b0;
    font-weight: bold;
}

/* Стиль для строки с результатами */
.post-content .result-row {
    background-color: #37373d !important;
    font-weight: bold;
}