/* Стили для Фотосессии */
.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-top: 10px;
    width: 100%;
}

.mini-preview-wrapper {
    position: relative; /* Обязательно для позиционирования кнопки внутри */
    width: 100%;
    aspect-ratio: 1;
}


.mini-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: block;
}

/* Стили самой кнопки */
.remove-attachment-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 22px; /* Центровка крестика по вертикали */
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    
    /* 🔥 КРИТИЧЕСКИ ВАЖНО 🔥 */
    z-index: 100;          /* Поверх всего */
    pointer-events: auto;  /* Разрешаем клики */
}

.remove-attachment-btn:hover {
    background-color: #bb2d3b;
    transform: scale(1.1);
}

#photoshoot-count-display {
    font-weight: bold;
    font-size: 1.1rem;
}


/* --- FIX: Размер превью одежды --- */
#photoshoot-clothes-upload .upload-preview img {
    max-height: 120px; /* Ограничиваем высоту, чтобы не рвало панель */
    width: auto;       /* Ширина подстроится автоматически */
    max-width: 100%;   /* Не шире контейнера */
    display: block;    /* Убираем отступы строчных элементов */
    margin: 0 auto;    /* Центрируем */
    border-radius: 6px;
}

/* Позиционирование крестика для одежды */
#photoshoot-clothes-upload .upload-preview {
    position: relative;
    display: inline-block; /* Чтобы блок обтягивал картинку */
}

#photoshoot-clothes-upload .remove-attachment {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
}

/* --- СЕТКА ФОТОСЕССИИ (4 СЛОТА) --- */
.slots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 колонки */
    gap: 10px;
    width: 100%;
}

.face-slot {
    aspect-ratio: 1; /* Квадрат */
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    
    /* Центровка плюсика */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.face-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

/* Состояние: Пустой слот (+) */
.slot-placeholder {
    color: var(--text-secondary);
    font-size: 24px;
    transition: color 0.2s;
}
.face-slot:hover .slot-placeholder {
    color: var(--accent-color);
}

/* Состояние: Заполненный слот (Картинка) */
.face-slot.filled {
    border-style: solid;
    border-color: transparent;
    background: #000;
    cursor: default; /* Сама картинка не кликабельна для загрузки, только крестик */
}

.slot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Кнопка удаления (Крестик) */
.slot-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(220, 53, 69, 0.9); /* Красный полупрозрачный */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slot-remove-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}