/* Упрощенная админка для редактора новостей */

.editor-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px 0;
}

/* Заголовки */
.editor-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #173261;
    margin-bottom: 0.5rem;
}

.editor-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.editor-form-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #173261;
    margin-bottom: 1rem;
}

/* Карточки категорий */
.category-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.category-icon {
    font-size: 3rem;
    color: #A9862C;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #173261;
    margin-bottom: 0.5rem;
}

.category-description {
    color: #666;
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.category-action {
    margin-top: auto;
}

/* Форма редактирования */
.editor-form-column {
    padding-right: 15px;
}

.editor-form-wrapper {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.category-badge {
    background: #A9862C;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.article-meta {
    display: flex;
    gap: 0.5rem;
}

/* Форма */
.editor-form .form-group {
    margin-bottom: 1.5rem;
}

.editor-form .form-label {
    font-weight: 600;
    color: #173261;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-form .form-control,
.editor-form .form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.editor-form .form-control:focus,
.editor-form .form-select:focus {
    border-color: #A9862C;
    box-shadow: 0 0 0 0.2rem rgba(169, 134, 44, 0.25);
}

/* Загрузка изображений */
.image-upload-area,
.gallery-upload-area {
    border: 2px dashed #A9862C;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    position: relative;
}

.image-upload-area:hover,
.gallery-upload-area:hover {
    background: #f5f5f5;
    border-color: #D9BA6A;
}

.upload-placeholder {
    cursor: pointer;
    color: #666;
}

.upload-placeholder i {
    font-size: 3rem;
    color: #A9862C;
    margin-bottom: 1rem;
    display: block;
}

.upload-placeholder p {
    margin: 0;
    font-size: 1rem;
}

.image-preview {
    position: relative;
    margin-top: 1rem;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Галерея */
.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .remove-gallery-image {
    position: absolute;
    top: 5px;
    right: 5px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item-existing {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.gallery-item-existing img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-item-existing .remove-gallery-image {
    position: absolute;
    top: 5px;
    right: 5px;
}

/* Предпросмотр */
.editor-preview-column {
    padding-left: 15px;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
}

.editor-preview-wrapper {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #173261;
    margin: 0;
}

.article-preview {
    font-family: 'Montserrat', sans-serif;
}

.article-title-preview {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #173261;
    margin-bottom: 1rem;
}

.article-image-preview img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.article-meta-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-excerpt-preview {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

.article-content-preview {
    color: #333;
    line-height: 1.8;
}

.article-content-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Кнопки действий */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
    flex-wrap: wrap;
}

.form-actions .btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .editor-container {
        padding: 15px 0;
    }
    
    .editor-form-wrapper,
    .editor-preview-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 991px) {
    .editor-preview-column {
        padding-left: 15px;
        padding-top: 2rem;
        position: static;
    }
    
    .editor-form-column {
        padding-right: 15px;
    }
    
    .editor-preview-wrapper {
        position: static;
        max-height: none;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
    
    .category-name {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .editor-container {
        padding: 10px 0;
    }
    
    .editor-title {
        font-size: 2rem;
    }
    
    .editor-subtitle {
        font-size: 1rem;
    }
    
    .editor-form-title {
        font-size: 1.5rem;
    }
    
    .editor-form-wrapper {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .editor-preview-wrapper {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        margin: 0;
    }
    
    .category-card {
        padding: 1.25rem;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .category-name {
        font-size: 1.1rem;
    }
    
    .category-description {
        font-size: 0.875rem;
    }
    
    .gallery-preview {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .gallery-item-existing img {
        width: 120px;
        height: 120px;
    }
    
    .article-title-preview {
        font-size: 1.5rem;
    }
    
    .article-excerpt-preview {
        font-size: 1rem;
    }
    
    .article-content-preview {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .editor-container {
        padding: 5px 0;
    }
    
    .editor-title {
        font-size: 1.75rem;
    }
    
    .editor-form-wrapper,
    .editor-preview-wrapper {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .editor-form .form-group {
        margin-bottom: 1rem;
    }
    
    .editor-form .form-label {
        font-size: 0.9rem;
    }
    
    .editor-form .form-control,
    .editor-form .form-select {
        padding: 0.5rem;
        font-size: 0.95rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-icon {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .category-name {
        font-size: 1rem;
    }
    
    .gallery-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .gallery-item-existing img {
        width: 100px;
        height: 100px;
    }
    
    .image-upload-area,
    .gallery-upload-area {
        padding: 1rem;
    }
    
    .upload-placeholder i {
        font-size: 2rem;
    }
    
    .upload-placeholder p {
        font-size: 0.875rem;
    }
    
    .article-title-preview {
        font-size: 1.25rem;
    }
    
    .preview-title {
        font-size: 1.25rem;
    }
}

/* Загрузка */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Текущее изображение */
.current-image {
    margin-bottom: 1rem;
}

.current-image img {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

/* Файлы */
.files-upload-area {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 2px dashed #dee2e6;
}

.file-upload-form {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.file-item,
.file-item-existing {
    background: white;
    transition: all 0.2s ease;
}

.file-item:hover,
.file-item-existing:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-item.loading {
    text-align: center;
    padding: 1rem;
}

.files-preview {
    margin-top: 1rem;
}

.existing-files {
    margin-bottom: 1rem;
}

