/* Основные стили для редактора Quill в стиле Google Docs */
#editor .ql-container {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    border: none !important;
}

/* Область редактирования */
#editor .ql-editor {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #202124;
    background-color: #ffffff;
    padding: 20px 40px;
    box-sizing: border-box;
}

/* Стили для панели инструментов */
.ql-toolbar.ql-snow {
    background-color: #f5f5f5!important
    border: 1px solid #dadce0!important;
    border-radius: 4px 4px 0 0!important;
    padding: 8px !important;
    border-bottom: none!important;
}

.ql-container.ql-snow {
    border: 1px solid #dadce0 !important;
    border-top: none !important;
    border-radius: 0 0 4px 4px !important;
}

/* Заголовки */
#editor .ql-editor h1 {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.25;
    color: #202124;
    margin: 24px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
}

#editor .ql-editor h2 {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    color: #202124;
    margin: 20px 0 8px 0;
}

#editor .ql-editor h3 {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    color: #202124;
    margin: 16px 0 8px 0;
}

/* Основной текст */
#editor .ql-editor p {
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* Списки */
#editor .ql-editor ul,
#editor .ql-editor ol {
    margin: 12px 0;
    padding-left: 24px;
}

#editor .ql-editor li {
    margin-bottom: 4px;
    line-height: 1.5;
}

#editor .ql-editor ul li::before {
    content: "•";
    color: #5f6368;
    font-size: 16px;
    margin-right: 8px;
}

/* Цитаты */
#editor .ql-editor blockquote {
    border-left: 4px solid #4285f4;
    margin: 16px 0;
    padding: 4px 0 4px 16px;
    color: #5f6368;
    font-style: italic;
    background-color: #f8f9fa;
}

/* Ссылки */
#editor .ql-editor a {
    color: #1a73e8;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

#editor .ql-editor a:hover {
    border-bottom: 1px solid #1a73e8;
}

/* Код */
#editor .ql-editor code {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    background-color: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: #d32f2f;
}

/* Выделение текста */
#editor .ql-editor strong {
    font-weight: 600;
}

#editor .ql-editor em {
    font-style: italic;
}

/* Изображения */
#editor .ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

#editor .ql-editor img:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Видео */
#editor .ql-editor video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Выделение медиа элементов */
#editor .ql-editor img.ql-selected,
#editor .ql-editor video.ql-selected {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Горизонтальная линия */
#editor .ql-editor hr {
    border: none;
    border-top: 1px solid #dadce0;
    margin: 24px 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    #editor .ql-editor {
        padding: 16px 20px;
    }
    
    .ql-toolbar.ql-snow {
        flex-wrap: wrap;
    }
}

/* Дополнительные эффекты для фокуса */
#editor .ql-editor:focus {
    outline: none;
}

/* Стили для placeholder */
#editor .ql-editor.ql-blank::before {
    color: #9aa0a6;
    font-style: normal;
    font-weight: 400;
}

/* Кастомные классы для различных форматов */
#editor .ql-editor .ql-size-small {
    font-size: 12px;
}

#editor .ql-editor .ql-size-large {
    font-size: 18px;
}

#editor .ql-editor .ql-size-huge {
    font-size: 24px;
}

/* Цвета текста */
#editor .ql-editor .ql-color-red {
    color: #d32f2f;
}

#editor .ql-editor .ql-color-blue {
    color: #1a73e8;
}

#editor .ql-editor .ql-color-green {
    color: #0d904f;
}
.ql-toolbar.ql-snow button {
    background: transparent !important;
    border: none !important;
    padding: 6px 8px !important;
    border-radius: 4px !important;
    transition: background-color 0.2s !important;
}

.ql-toolbar.ql-snow button:hover {
    background-color: rgba(255,255,255,0.1) !important;
}

.ql-toolbar.ql-snow .ql-active {
    background-color: rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
}

/* Плавающая панель над выделением (bubble toolbar) */
.bubble-toolbar {
    position: absolute;
    display: none;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #1f2937;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 20;
    transform: translate(-50%, -120%);
    font-size: 13px;
    align-items: center;
}

.bubble-toolbar button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.bubble-toolbar button:hover {
    background: rgba(255,255,255,0.2);
}

/* Стили для кнопки таблиц в toolbar */
.ql-toolbar.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker).ql-table-up {
    width: 28px;
}

.ql-toolbar.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker).ql-table-up .ql-picker-label {
    padding: 2px 4px;
}

.ql-toolbar.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker).ql-table-up .ql-picker-label svg {
    position: static;
    margin-top: 0;
}
