/* ====================== 08-EDIT-MODAL.CSS ====================== */
/* Стили для режима редактирования (фото, вложения, списки) */

.edit-section {
    margin-bottom: 20px;
}

.scrollable-section {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.fixed-button-panel {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #eee;
    padding: 16px 0 8px 0;
    display: flex;
    gap: 12px;
    z-index: 10;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

body.theme-dark .fixed-button-panel {
    background: #2d2d2d;
    border-top-color: #444;
}

/* control-btn внутри модалки */
.fixed-button-panel .control-btn {
    flex: 1;
    font-size: 1.05em;
    padding: 14px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fixed-button-panel .control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0,0,0,0.15);
}

/* Цветовые варианты */
.fixed-button-panel .control-btn.cancel {
    background: #95a5a6;
    color: white;
}

.fixed-button-panel .control-btn.save {
    background: #27ae60;
    color: white;
}

.fixed-button-panel .control-btn.primary {
    background: #3498db;
    color: white;
}


/* Списки вложений */
#editPhotoList, #editOtherList {
    margin-top: 10px;
}

/* Карточки фотографий */
#editPhotoList > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
}

body.theme-dark #editPhotoList > div {
    background: #3a3a3a;
    border-color: #555;
}

/* Карточки других вложений */
#editOtherList > div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 6px;
}

body.theme-dark #editOtherList > div {
    background: #3a3a3a;
    border-color: #555;
}

/* Тёмная тема */
body.theme-dark .fixed-button-panel .control-btn.cancel { background: #7f8c8d; }
body.theme-dark .fixed-button-panel .control-btn.save   { background: #2ecc71; }
body.theme-dark .fixed-button-panel .control-btn.primary{ background: #3498db; }


/* Иконка удаления */
.delete-btn {
    transition: transform 0.2s;
    flex-shrink: 0;
    font-size: 1.4em;
    padding: 4px 8px;
    color: #999;
}

.delete-btn:hover {
    transform: scale(1.2);
    color: #c0392b !important;
}

/* Адаптация под маленькие экраны */
@media (max-width: 480px) {
    #editPhotoList img {
        width: 54px;
        height: 54px;
    }

    .delete-btn {
        font-size: 18px;
        padding: 6px;
    }
}

/* Перенос длинных имён файлов */
#editPhotoList span,
#editOtherList span {
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: auto;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.attach-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attach-item:last-child {
    border-bottom: none;
}