.file-input-list {
    --fil-primary: #4A90E2;
    --fil-danger: #DC3545;
    --fil-success: #2ECC71;
    --fil-bg: #F8F9FA;
    --fil-border: #E9ECEF;
    --fil-text: #212529;
    --fil-muted: #6C757D;
    
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Все дочерние элементы привязаны к корню */
    .file-input-list--wrapper {
        position: relative;
    }

    .file-input-list--hidden {
        position: absolute;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
        z-index: 10;
        top: 0;
        left: 0;
    }

    &:not(:has(.file-input-list--hidden)) input[type="file"] {
        margin-bottom: 8px;
    }

    .file-input-list--drop-zone {
        border: 2px dashed var(--fil-border);
        border-radius: 12px;
        padding: 30px 20px;
        text-align: center;
        background: var(--fil-bg);
        cursor: pointer;
        transition: all 0.3s ease;
        margin-bottom: 12px;

        &:hover {
            border-color: var(--fil-primary);
            background: #EBF8FF;
        }
    }

    &.file-input-list--drag-over .file-input-list--drop-zone {
        border-color: var(--fil-success);
        background: #F0FFF4;
        transform: scale(1.02);
    }

    .file-input-list--drop-content {
        pointer-events: none;
    }

    .file-input-list--drop-icon {
        font-size: 48px;
        display: block;
        margin-bottom: 10px;
    }

    .file-input-list--drop-text {
        font-size: 16px;
        color: var(--fil-text);
        margin: 0 0 5px 0;
        font-weight: 600;
    }

    .file-input-list--drop-hint {
        font-size: 14px;
        color: var(--fil-muted);
        margin: 0 0 15px 0;
    }

    .file-input-list--drop-btn {
        padding: 10px 24px;
        background: var(--fil-primary);
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s ease;
        pointer-events: auto;

        &:hover {
            background: #357ABD;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
        }
    }

    .file-input-list--list {
        margin-top: 12px;
        padding: 12px;
        background: var(--fil-bg);
        border-radius: 8px;
        border: 1px solid var(--fil-border);
        min-height: 40px;
        transition: all 0.3s ease;
    }

    .file-input-list--item {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        margin-bottom: 6px;
        background: white;
        border-radius: 6px;
        border: 1px solid var(--fil-border);
        transition: all 0.3s ease;
        animation: filSlideIn 0.3s ease forwards;
        opacity: 0;
        transform: translateX(-10px);

        &:last-child {
            margin-bottom: 0;
        }

        &:hover {
            border-color: var(--fil-primary);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }
    }

    .file-input-list--placeholder {
        color: var(--fil-muted);
        font-style: italic;
        justify-content: center;
        opacity: 1 !important;
        transform: none !important;
    }

    .file-input-list--icon {
        font-size: 20px;
        margin-right: 10px;
        flex-shrink: 0;
    }

    .file-input-list--name {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
        color: var(--fil-text);
        margin-right: 10px;
    }

    .file-input-list--size {
        font-size: 12px;
        color: var(--fil-muted);
        margin-right: 12px;
        white-space: nowrap;
    }

    .file-input-list--remove {
        width: 26px;
        height: 26px;
        border: none;
        background: var(--fil-danger);
        color: white;
        border-radius: 50%;
        cursor: pointer;
        font-size: 18px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-shrink: 0;
        padding: 0;
        margin: 0;

        &:hover {
            background: #C82333;
            transform: scale(1.15);
        }
    }

    .file-input-list--counter {
        margin-top: 8px;
        font-size: 13px;
        color: var(--fil-primary);
        font-weight: 600;
    }

    .file-input-list--notification {
        position: absolute;
        bottom: calc(100% + 10px);
        right: 0;
        padding: 12px 20px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        z-index: 100;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        white-space: nowrap;
    }

    .file-input-list--notification-error {
        background: #FED7D7;
        color: #C53030;
        border-left: 4px solid #C53030;
    }

    .file-input-list--notification-success {
        background: #C6F6D5;
        color: #276749;
        border-left: 4px solid #276749;
    }
}

/* Глобальные правила (keyframes и media) вынесены отдельно во избежание багов */
@keyframes filSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .file-input-list {
        max-width: 100%;
        
        .file-input-list--name {
            max-width: 120px;
        }
        
        .file-input-list--size {
            display: none;
        }
        
        .file-input-list--drop-icon {
            font-size: 36px;
        }
    }
}
