.as-modal-overlay {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.as-modal-overlay.active {
    display: flex; /* Показываем при наличии класса active */
}

.as-modal-container {
    position: relative; /* Для позиционирования крестика */
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.as-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
}

.as-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none; /* Скрыто по умолчанию */
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Максимальный приоритет */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.as-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    width: 95%;
    max-width: 380px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.as-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    line-height: 1;
    color: #bdc3c7;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 5px;
}

.as-modal-close:hover {
    color: #2f3542;
}

/* Состояние при открытии */
.as-modal-overlay.as-show {
    display: flex;
    opacity: 1;
}

.as-modal-overlay.as-show .as-modal-container {
    transform: scale(1);
}

.as-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.as-modal-text {
    color: #5d6d7e;
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.as-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Кнопки */
.as-modal-footer button {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.as-btn-cancel {
    background: #f1f2f6;
    color: #2f3542;
}

.as-btn-cancel:hover {
    background: #dfe4ea;
}

.as-btn-action-delete {
    background: var(--upload-color, #00d2ff);
    color: white;
}

.as-btn-action-delete:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(255, 85, 1, 0.3);
}

/* Контейнер сетки */
.as-info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* Строка: по умолчанию в две колонки */
.as-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две равные колонки */
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f2f6;
}

/* Названия полей */
.as-info-key {
    font-weight: 600;
    color: #2f3542;
    font-size: 0.9rem;
}

/* Значения полей */
.as-info-value {
    color: #5d6d7e;
    text-align: right;
    font-size: 0.9rem;
    word-break: break-all; /* Чтобы длинные пути не ломали верстку */
}

/* Адаптивность: для экранов меньше 480px переходим в одну колонку */
@media (max-width: 480px) {
    .as-info-row {
        grid-template-columns: 1fr; /* Одна колонка */
        gap: 4px;
        padding: 8px 0;
    }

    .as-info-value {
        text-align: left; /* Текст слева для удобства чтения на телефоне */
        color: #1a1a1a;
    }
}

.as-upload-wrapper {
    margin-bottom: 20px;
}

.as-upload-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px dashed #dfe4ea;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.as-upload-label:hover {
    border-color: #00d2ff;
    background: #fff;
}

.as-cover-preview {
    width: 60px;
    height: 60px;
    background-color: #ecf0f1;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bdc3c7;
    font-size: 24px;
    flex-shrink: 0;
    border: 1px solid #ddd;
}

.as-upload-text strong {
    display: block;
    font-size: 0.9rem;
    color: #2f3542;
}

.as-upload-text p {
    margin: 0;
    font-size: 0.75rem;
    color: #a4b0be;
}


.as-upload-container {
    position: relative;
}

.as-upload-wrapper {
    position: relative;
    transition: transform 0.2s ease;
}

/* Стиль при перетаскивании файла над областью */
.as-upload-wrapper.dragover {
    border-color: #00d2ff;
    background: #fff0e9;
    transform: scale(1.02);
}

/* Кнопка удаления (крестик) */
.as-remove-cover {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

.as-remove-cover:hover {
    background: #ff6b81;
}