/* Основные стили для создания статей */
.tags-help>p {
    padding: 0;
    margin: 0;
}

/* Сообщения об успехе */
.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 15px 0;
}

.success-message a {
    color: #155724;
    text-decoration: underline;
}

.success-message a:hover {
    color: #0b2e13;
}

/* Стили для управления изображениями */
.images-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.images-container:hover {
    border-color: #007cba;
    background: #f0f8ff;
}

.images-container.dragover {
    border-color: #007cba;
    background: #e6f3ff;
}

#uploaded-images {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

#images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 5px;
    margin: 0;
}

.add-more-images-container {
    margin-top: 10px;
    text-align: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.add-more-images-container:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.image-count-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.add-more-images-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-more-images-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.add-more-images-btn i {
    font-size: 12px;
}

.image-item {
    position: relative !important;
    width: 120px !important;
    height: 120px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #f9f9f9 !important;
    cursor: move !important;
    transition: all 0.3s ease !important;
}

.image-item:hover {
    border-color: #007cba !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.3);
}

.image-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.delete-image-btn,
.delete-image {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    background: rgba(220, 53, 69, 0.9) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.delete-image-btn:hover,
.delete-image:hover {
    background: rgba(220, 53, 69, 1) !important;
    transform: scale(1.1) !important;
    z-index: 15 !important;
}

.image-number {
    position: absolute !important;
    bottom: 5px !important;
    left: 5px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    font-weight: bold !important;
}

#images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* Стили для управления изображениями (как в edit.php) */
.images-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.image-item {
    position: relative;
    width: 120px;
    height: 120px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: move;
    overflow: hidden;
}

.image-item:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.15);
    transform: translateY(-2px);
}

.image-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.image-item .delete-image {
    position: absolute;
    top: 0;
    right: 0;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 10;
}

.image-item .delete-image:hover {
    background: #c82333;
    transform: scale(1.1);
}

.image-item .image-number {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    z-index: 5;
}

.image-item[draggable="true"] {
    cursor: grab;
}

.image-item[draggable="true"]:active {
    cursor: grabbing;
    opacity: 0.7;
    transform: scale(0.98);
}

.image-item.drag-over {
    border: 2px dashed #007cba !important;
    background: #e3f2fd !important;
}

.help-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    margin-bottom: 0;
}

/* --- Стилевой блок: выпадающий список "Формат текста" и иконка подсказки --- */
/* Выпадающий список "Формат текста" и иконка подсказки теперь стилизуются в modules/ContentFilter/assets.css */

/* Стили для индикатора черновика */
.draft-icon {
    stroke: #666; /* Серый цвет по умолчанию */
    stroke-width: 1.5;
}

.draft-icon-saved {
    stroke: #28a745 !important; /* Зеленый цвет для сохраненного черновика */
}

.draft-icon-unsaved {
    stroke: #ffc107 !important; /* Желтый цвет для несохраненного черновика */
}



/* ===============================
   СТИЛИ ДЛЯ КНОПКИ РАСШИРЕНИЯ И ЧЕРНОВИКА
   =============================== */

.expand-editor-btn {
    background: #e2e2e2;
    color: #000000;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    z-index: 3;
    font-size: 16px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.expand-editor-btn:hover {
    background: #5a6268;
}

.draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #81c784;
    transition: opacity 0.3s;
    opacity: 1;
}

.draft-badge i {
    font-size: 14px;
}

#draft-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.clear-draft-btn {
    background: #ffebee;
    color: #c62828!important;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.clear-draft-btn:hover {
    background: #ffcdd2;
}

.draft-undo-notification {
    position: fixed;
    bottom: -100px;
    left: 20px;
    background: #323232;
    color: white;
    padding: 16px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    z-index: 10000;
    transition: bottom 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.draft-undo-notification.show {
    bottom: 20px;
}

.draft-undo-notification .undo-btn {
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.draft-undo-notification .undo-btn:hover {
    background: #f57c00;
}

.draft-undo-notification .undo-timer {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

	    .images-list {
				border: 0 dashed #dee2e6;
			}


/* Адаптивные стили */
@media (max-width: 768px) {
	    .images-list {
        flex-direction: row;
        align-items: center;
				border: 0 dashed #dee2e6;
			}
    /* .image-item {
        height: 100px !important;
    }

    #images-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 8px;
    }

    .delete-image-btn {
        width: 20px !important;
        height: 20px !important;
        font-size: 10px !important;
    } */
}